bpf: Make some symbols static
Subsystems (4)
PATCH 1/1 bpf: Make some symbols static
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.
--- kernel/bpf/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/bpf/syscall.c +2 -2
@@ -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 ,
Signature · 1 line
2.17.1
Quoted 14 lines · Pu Lehui
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 <[email protected]>
Quoted 29 lines
---
kernel/bpf/syscall.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)kernel/bpf/syscall.c +2
-2@@ -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 ,Signature · 1 line
2.17.1
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
Quoted 8 lines · On Wed, 19 May 2021 14:41:16 +0800 you 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?[...]
Here is the summary with links:
- [bpf-next] bpf: Make some symbols static
https://git.kernel.org/bpf/bpf-next/c/3a2daa724864
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html