]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix sparse warning for bpf_kptr_xchg_proto
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Wed, 11 May 2022 19:46:51 +0000 (01:16 +0530)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 11 May 2022 23:57:27 +0000 (16:57 -0700)
commit1689739808afa75261dbd868e4b96ae759c5a06b
tree9c59f3f6b6621ef73852df352a5e69f7ab2745d5
parentfe57032eaefd4e43e83e441e40406192222592ff
bpf: Fix sparse warning for bpf_kptr_xchg_proto

Kernel Test Robot complained about missing static storage class
annotation for bpf_kptr_xchg_proto variable.

sparse: symbol 'bpf_kptr_xchg_proto' was not declared. Should it be static?

This caused by missing extern definition in the header. Add it to
suppress the sparse warning.

Fixes: e1634f371658 ("bpf: Allow storing referenced kptr in map")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20220511194654.765705-2-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h