[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 11 Nov 2020 10:15:21 -0800
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Qian Cai <cai@...hat.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>,
Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <ast@...nel.org>,
Networking <netdev@...r.kernel.org>,
Andrii Nakryiko <andrii@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: Re: linux-next: build warning after merge of the bpf-next tree
On Wed, Nov 11, 2020 at 6:03 AM Qian Cai <cai@...hat.com> wrote:
>
> On Wed, 2020-11-11 at 12:01 +1100, Stephen Rothwell wrote:
> > 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")
> >
>
> It loos like btf_parse_module() is only used when
> CONFIG_DEBUG_INFO_BTF_MODULES=y, so this should fix it.
Fixed already in [0].
[0] https://patchwork.kernel.org/project/netdevbpf/patch/20201111040645.903494-1-andrii@kernel.org/
>
> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
> index 0f1fd2669d69..e877eeebc616 100644
> --- a/kernel/bpf/btf.c
> +++ b/kernel/bpf/btf.c
> @@ -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)
> {
>
Powered by blists - more mailing lists