diff mbox series

[bpf-next] bpf: Fix build error in case of !CONFIG_DEBUG_INFO_BTF

Message ID 20220722113605.6513-1-memxor@gmail.com (mailing list archive)
State Accepted
Commit e423414375866a399ebbe55ed044acb39846e8bf
Delegated to: BPF
Headers show
Series [bpf-next] bpf: Fix build error in case of !CONFIG_DEBUG_INFO_BTF | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for bpf-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 178 this patch: 147
netdev/cc_maintainers warning 8 maintainers not CCed: song@kernel.org jolsa@kernel.org martin.lau@linux.dev john.fastabend@gmail.com yhs@fb.com sdf@google.com kpsingh@kernel.org haoluo@google.com
netdev/build_clang success Errors and warnings before: 65 this patch: 10
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 178 this patch: 147
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 16 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-next-VM_Test-3 success Logs for Kernel LATEST on z15 with gcc
bpf/vmtest-bpf-next-PR success PR summary
bpf/vmtest-bpf-next-VM_Test-1 success Logs for Kernel LATEST on ubuntu-latest with gcc
bpf/vmtest-bpf-next-VM_Test-2 success Logs for Kernel LATEST on ubuntu-latest with llvm-15

Commit Message

Kumar Kartikeya Dwivedi July 22, 2022, 11:36 a.m. UTC
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 <lkp@intel.com>
Fixes: ab21d6063c01 ("bpf: Introduce 8-byte BTF set")
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
---
 include/linux/btf_ids.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--
2.34.1

Comments

Jiri Olsa July 22, 2022, 12:40 p.m. UTC | #1
On Fri, Jul 22, 2022 at 01:36:05PM +0200, Kumar Kartikeya Dwivedi wrote:
> 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 <lkp@intel.com>
> Fixes: ab21d6063c01 ("bpf: Introduce 8-byte BTF set")
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>

Acked-by: Jiri Olsa <jolsa@kernel.org>

jirka

> ---
>  include/linux/btf_ids.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h
> index 3cb0741e71d7..2aea877d644f 100644
> --- a/include/linux/btf_ids.h
> +++ b/include/linux/btf_ids.h
> @@ -206,7 +206,7 @@ extern struct btf_id_set8 name;
> 
>  #define BTF_ID_LIST(name) static u32 __maybe_unused name[5];
>  #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_LIST_GLOBAL(name, n) u32 __maybe_unused name[n];
>  #define BTF_ID_LIST_SINGLE(name, prefix, typename) static u32 __maybe_unused name[1];
> @@ -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_END(name)
>  #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 */
> 
> --
> 2.34.1
>
patchwork-bot+netdevbpf@kernel.org July 22, 2022, 4:10 p.m. UTC | #2
Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Fri, 22 Jul 2022 13:36:05 +0200 you wrote:
> 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 <lkp@intel.com>
> Fixes: ab21d6063c01 ("bpf: Introduce 8-byte BTF set")
> Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpf: Fix build error in case of !CONFIG_DEBUG_INFO_BTF
    https://git.kernel.org/bpf/bpf-next/c/e42341437586

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h
index 3cb0741e71d7..2aea877d644f 100644
--- a/include/linux/btf_ids.h
+++ b/include/linux/btf_ids.h
@@ -206,7 +206,7 @@  extern struct btf_id_set8 name;

 #define BTF_ID_LIST(name) static u32 __maybe_unused name[5];
 #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_LIST_GLOBAL(name, n) u32 __maybe_unused name[n];
 #define BTF_ID_LIST_SINGLE(name, prefix, typename) static u32 __maybe_unused name[1];
@@ -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_END(name)
 #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 */