Commit e4234143 authored by Kumar Kartikeya Dwivedi's avatar Kumar Kartikeya Dwivedi Committed by Alexei Starovoitov

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: default avatarkernel test robot <lkp@intel.com>
Fixes: ab21d606 ("bpf: Introduce 8-byte BTF set")
Signed-off-by: default avatarKumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
Link: https://lore.kernel.org/r/20220722113605.6513-1-memxor@gmail.comSigned-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent ac7ac432
...@@ -206,7 +206,7 @@ extern struct btf_id_set8 name; ...@@ -206,7 +206,7 @@ extern struct btf_id_set8 name;
#define BTF_ID_LIST(name) static u32 __maybe_unused name[5]; #define BTF_ID_LIST(name) static u32 __maybe_unused name[5];
#define BTF_ID(prefix, name) #define BTF_ID(prefix, name)
#define BTF_ID_FLAGS(prefix, name, flags) #define BTF_ID_FLAGS(prefix, name, ...)
#define BTF_ID_UNUSED #define BTF_ID_UNUSED
#define BTF_ID_LIST_GLOBAL(name, n) u32 __maybe_unused name[n]; #define BTF_ID_LIST_GLOBAL(name, n) u32 __maybe_unused name[n];
#define BTF_ID_LIST_SINGLE(name, prefix, typename) static u32 __maybe_unused name[1]; #define BTF_ID_LIST_SINGLE(name, prefix, typename) static u32 __maybe_unused name[1];
...@@ -215,7 +215,7 @@ extern struct btf_id_set8 name; ...@@ -215,7 +215,7 @@ extern struct btf_id_set8 name;
#define BTF_SET_START_GLOBAL(name) static struct btf_id_set __maybe_unused name = { 0 }; #define BTF_SET_START_GLOBAL(name) static struct btf_id_set __maybe_unused name = { 0 };
#define BTF_SET_END(name) #define BTF_SET_END(name)
#define BTF_SET8_START(name) static struct btf_id_set8 __maybe_unused name = { 0 }; #define BTF_SET8_START(name) static struct btf_id_set8 __maybe_unused name = { 0 };
#define BTF_SET8_END(name) static struct btf_id_set8 __maybe_unused name = { 0 }; #define BTF_SET8_END(name)
#endif /* CONFIG_DEBUG_INFO_BTF */ #endif /* CONFIG_DEBUG_INFO_BTF */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment