linux-next: build warning after merge of the bpf-next tree
Subsystems (4)
Hi all,
After merging the bpf-next tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:
kernel/bpf/btf.c:4481:20: warning: 'btf_parse_module' defined but not used [-Wunused-function]
4481 | static struct btf *btf_parse_module(const char *module_name, const void *data, unsigned int data_size)
| ^~~~~~~~~~~~~~~~
Introduced by commit
36e68442d1af ("bpf: Load and verify kernel module BTFs")
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 9 lines · Stephen Rothwell
Hi all,
After merging the bpf-next tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
kernel/bpf/btf.c:4481:20: warning: 'btf_parse_module' defined but not used [- Wunused-function]
4481 | static struct btf *btf_parse_module(const char*module_name, const
void *data, unsigned intdata_size)
Quoted 6 lines
| ^~~~~~~~~~~~~~~~Introduced by commit
36e68442d1af("bpf: Load and verify kernel module BTFs")
It loos like btf_parse_module() is only used when CONFIG_DEBUG_INFO_BTF_MODULES=y, so this should fix it.
kernel/bpf/btf.c +2 -0
@@ -4478,6 +4478,7 @@ struct btf *btf_parse_vmlinux(void)return ERR_PTR (err); } +#ifdef CONFIG_DEBUG_INFO_BTF_MODULES static struct btf *btf_parse_module (const char *module_name,const void *data,unsigned int data_size) {struct btf_verifier_env *env =NULL ;
@@ -4546,6 +4547,7 @@ static struct btf *btf_parse_module(const char *module_name, const void *data, u }return ERR_PTR (err); } +#endif /* CONFIG_DEBUG_INFO_BTF_MODULES */ struct btf *bpf_prog_get_target_btf (const struct bpf_prog *prog) {
Quoted 13 lines · Qian Cai
Quoted 11 lines · Stephen Rothwell
Hi all,
After merging the bpf-next tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
kernel/bpf/btf.c:4481:20: warning: 'btf_parse_module' defined but not used [- Wunused-function]
4481 | static struct btf *btf_parse_module(const char*module_name, const
void *data, unsigned intdata_size)| ^~~~~~~~~~~~~~~~
Quoted 7 lines
Quoted 4 lines
Introduced by commit
36e68442d1af("bpf: Load and verify kernel module BTFs")It loos like
btf_parse_module()is only used whenCONFIG_DEBUG_INFO_BTF_MODULES=y, so this should fix it.
Fixed already in [0].
[0] https://patchwork.kernel.org/project/netdevbpf/patch/[email protected]/
Quoted 22 lines
kernel/bpf/btf.c +2
-0@@ -4478,6 +4478,7 @@ struct btf *btf_parse_vmlinux(void)return ERR_PTR (err); } +#ifdef CONFIG_DEBUG_INFO_BTF_MODULES static struct btf *btf_parse_module (const char *module_name,const void *data,unsigned int data_size) {struct btf_verifier_env *env =NULL ;@@ -4546,6 +4547,7 @@ static struct btf *btf_parse_module(const char *module_name, const void *data, u }return ERR_PTR (err); } +#endif /* CONFIG_DEBUG_INFO_BTF_MODULES */ struct btf *bpf_prog_get_target_btf (const struct bpf_prog *prog) {