[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10D9E2CC-1EF1-4F67-A5FC-735D1A1F1E40@fb.com>
Date: Wed, 19 May 2021 17:13:42 +0000
From: Song Liu <songliubraving@...com>
To: Pu Lehui <pulehui@...wei.com>
CC: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin Lau <kafai@...com>,
Yonghong Song <yhs@...com>,
"john.fastabend@...il.com" <john.fastabend@...il.com>,
"kpsingh@...nel.org" <kpsingh@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: Make some symbols static
> On May 18, 2021, at 11:41 PM, Pu Lehui <pulehui@...wei.com> wrote:
>
> The sparse tool complains as follows:
>
> kernel/bpf/syscall.c:4567:29: warning:
> symbol 'bpf_sys_bpf_proto' was not declared. Should it be static?
> kernel/bpf/syscall.c:4592:29: warning:
> symbol 'bpf_sys_close_proto' was not declared. Should it be static?
>
> This symbol is not used outside of syscall.c, so marks it static.
>
> Signed-off-by: Pu Lehui <pulehui@...wei.com>
Acked-by: Song Liu <songliubraving@...com>
> ---
> kernel/bpf/syscall.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
> index 2361d97e2c67..73d15bc62d8c 100644
> --- a/kernel/bpf/syscall.c
> +++ b/kernel/bpf/syscall.c
> @@ -4564,7 +4564,7 @@ BPF_CALL_3(bpf_sys_bpf, int, cmd, void *, attr, u32, attr_size)
> return __sys_bpf(cmd, KERNEL_BPFPTR(attr), attr_size);
> }
>
> -const struct bpf_func_proto bpf_sys_bpf_proto = {
> +static const struct bpf_func_proto bpf_sys_bpf_proto = {
> .func = bpf_sys_bpf,
> .gpl_only = false,
> .ret_type = RET_INTEGER,
> @@ -4589,7 +4589,7 @@ BPF_CALL_1(bpf_sys_close, u32, fd)
> return close_fd(fd);
> }
>
> -const struct bpf_func_proto bpf_sys_close_proto = {
> +static const struct bpf_func_proto bpf_sys_close_proto = {
> .func = bpf_sys_close,
> .gpl_only = false,
> .ret_type = RET_INTEGER,
> --
> 2.17.1
>
Powered by blists - more mailing lists