Skip to content

Commit e423414

Browse files
kkdwivediAlexei Starovoitov
authored andcommitted
bpf: Fix build error in case of !CONFIG_DEBUG_INFO_BTF
BTF_ID_FLAGS macro needs to be able to take 0 or 1 args, so make it a variable argument. BTF_SET8_END is incorrect, it should just be empty. Reported-by: kernel test robot <[email protected]> Fixes: ab21d60 ("bpf: Introduce 8-byte BTF set") Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Acked-by: Jiri Olsa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent ac7ac43 commit e423414

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/btf_ids.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ extern struct btf_id_set8 name;
206206

207207
#define BTF_ID_LIST(name) static u32 __maybe_unused name[5];
208208
#define BTF_ID(prefix, name)
209-
#define BTF_ID_FLAGS(prefix, name, flags)
209+
#define BTF_ID_FLAGS(prefix, name, ...)
210210
#define BTF_ID_UNUSED
211211
#define BTF_ID_LIST_GLOBAL(name, n) u32 __maybe_unused name[n];
212212
#define BTF_ID_LIST_SINGLE(name, prefix, typename) static u32 __maybe_unused name[1];
@@ -215,7 +215,7 @@ extern struct btf_id_set8 name;
215215
#define BTF_SET_START_GLOBAL(name) static struct btf_id_set __maybe_unused name = { 0 };
216216
#define BTF_SET_END(name)
217217
#define BTF_SET8_START(name) static struct btf_id_set8 __maybe_unused name = { 0 };
218-
#define BTF_SET8_END(name) static struct btf_id_set8 __maybe_unused name = { 0 };
218+
#define BTF_SET8_END(name)
219219

220220
#endif /* CONFIG_DEBUG_INFO_BTF */
221221

0 commit comments

Comments
 (0)