bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH linux-next] bpf: bpf_kptr_xchg_proto can be static
  2022-04-29 22:34 [linux-next:master 6297/7959] kernel/bpf/helpers.c:1389:29: sparse: sparse: symbol 'bpf_kptr_xchg_proto' was not declared. Should it be static? kernel test robot
@ 2022-04-29 22:33 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-29 22:33 UTC (permalink / raw)
  To: Kumar Kartikeya Dwivedi
  Cc: kbuild-all, Linux Memory Management List, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, netdev, bpf,
	linux-kernel

kernel/bpf/helpers.c:1389:29: warning: symbol 'bpf_kptr_xchg_proto' was not declared. Should it be static?

Fixes: c0a5a21c25f3 ("bpf: Allow storing referenced kptr in map")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
 kernel/bpf/helpers.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
index 3e709fed530612..62864d2c44e4a3 100644
--- a/kernel/bpf/helpers.c
+++ b/kernel/bpf/helpers.c
@@ -1386,7 +1386,7 @@ BPF_CALL_2(bpf_kptr_xchg, void *, map_value, void *, ptr)
  */
 #define BPF_PTR_POISON ((void *)((0xeB9FUL << 2) + POISON_POINTER_DELTA))
 
-const struct bpf_func_proto bpf_kptr_xchg_proto = {
+static const struct bpf_func_proto bpf_kptr_xchg_proto = {
 	.func         = bpf_kptr_xchg,
 	.gpl_only     = false,
 	.ret_type     = RET_PTR_TO_BTF_ID_OR_NULL,

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [linux-next:master 6297/7959] kernel/bpf/helpers.c:1389:29: sparse: sparse: symbol 'bpf_kptr_xchg_proto' was not declared. Should it be static?
@ 2022-04-29 22:34 kernel test robot
  2022-04-29 22:33 ` [RFC PATCH linux-next] bpf: bpf_kptr_xchg_proto can be static kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-04-29 22:34 UTC (permalink / raw)
  To: Kumar Kartikeya Dwivedi
  Cc: kbuild-all, Linux Memory Management List, Alexei Starovoitov,
	Daniel Borkmann, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, netdev, bpf,
	linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   5469f0c06732a077c70a759a81f2a1f00b277694
commit: c0a5a21c25f37c9fd7b36072f9968cdff1e4aa13 [6297/7959] bpf: Allow storing referenced kptr in map
config: x86_64-randconfig-s022 (https://download.01.org/0day-ci/archive/20220430/202204300646.B29EmUql-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c0a5a21c25f37c9fd7b36072f9968cdff1e4aa13
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout c0a5a21c25f37c9fd7b36072f9968cdff1e4aa13
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/bpf/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> kernel/bpf/helpers.c:1389:29: sparse: sparse: symbol 'bpf_kptr_xchg_proto' was not declared. Should it be static?

Please review and possibly fold the followup patch.

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-29 22:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 22:34 [linux-next:master 6297/7959] kernel/bpf/helpers.c:1389:29: sparse: sparse: symbol 'bpf_kptr_xchg_proto' was not declared. Should it be static? kernel test robot
2022-04-29 22:33 ` [RFC PATCH linux-next] bpf: bpf_kptr_xchg_proto can be static kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).