Skip to content

Commit

Permalink
bpf: Make some symbols static
Browse files Browse the repository at this point in the history
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@huawei.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210519064116.240536-1-pulehui@huawei.com
  • Loading branch information
Pu Lehui authored and Alexei Starovoitov committed May 19, 2021
1 parent 5d67f34 commit 3a2daa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/bpf/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -4563,7 +4563,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,
Expand All @@ -4588,7 +4588,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,
Expand Down

0 comments on commit 3a2daa7

Please sign in to comment.