mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [congwang:sch_bpf 1/3] net/core/skb_map.c:264:36: warning: unused variable 'bpf_skb_map_pop_proto'
@ 2022-05-21 21:35 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-21 21:35 UTC (permalink / raw)
  To: Cong Wang; +Cc: llvm, kbuild-all, linux-kernel

tree:   https://github.com/congwang/linux.git sch_bpf
head:   c3a4f3837326ac3d30a3775f7671467b27cc42b7
commit: a9c541fc36e03672a64d65cfa7a08e65743f34c2 [1/3] bpf: introduce skb map
config: hexagon-randconfig-r006-20220522 (https://download.01.org/0day-ci/archive/20220522/202205220540.iNtltJFv-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project b369762beb70dfef22c7e793aed79b94d7dc0757)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/congwang/linux/commit/a9c541fc36e03672a64d65cfa7a08e65743f34c2
        git remote add congwang https://github.com/congwang/linux.git
        git fetch --no-tags congwang sch_bpf
        git checkout a9c541fc36e03672a64d65cfa7a08e65743f34c2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash net/core/

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

All warnings (new ones prefixed by >>):

>> net/core/skb_map.c:264:36: warning: unused variable 'bpf_skb_map_pop_proto' [-Wunused-const-variable]
   static const struct bpf_func_proto bpf_skb_map_pop_proto = {
                                      ^
>> net/core/skb_map.c:287:36: warning: unused variable 'bpf_skb_map_push_proto' [-Wunused-const-variable]
   static const struct bpf_func_proto bpf_skb_map_push_proto = {
                                      ^
   2 warnings generated.


vim +/bpf_skb_map_pop_proto +264 net/core/skb_map.c

   263	
 > 264	static const struct bpf_func_proto bpf_skb_map_pop_proto = {
   265		.func		= bpf_skb_map_pop,
   266		.gpl_only	= false,
   267		.ret_type	= RET_INTEGER,
   268		.arg1_type	= ARG_CONST_MAP_PTR,
   269		.arg2_type	= ARG_ANYTHING,
   270	};
   271	
   272	BPF_CALL_3(bpf_skb_map_push, struct bpf_map *, map, struct sk_buff *, skb, u64, key)
   273	{
   274		struct bpf_skb_map *rb = bpf_skb_map(map);
   275		unsigned long flags;
   276	
   277		if (atomic_inc_return(&rb->count) > rb->map.max_entries)
   278			return -ENOBUFS;
   279		skb = skb_get(skb);
   280		skb_map_cb(skb)->rank = key;
   281		raw_spin_lock_irqsave(&rb->lock, flags);
   282		skb_rb_push(&rb->root, skb);
   283		raw_spin_unlock_irqrestore(&rb->lock, flags);
   284		return 0;
   285	}
   286	
 > 287	static const struct bpf_func_proto bpf_skb_map_push_proto = {
   288		.func		= bpf_skb_map_push,
   289		.gpl_only	= false,
   290		.ret_type	= RET_INTEGER,
   291		.arg1_type	= ARG_CONST_MAP_PTR,
   292		.arg2_type	= ARG_PTR_TO_CTX,
   293		.arg3_type	= ARG_ANYTHING,
   294	};
   295	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-21 21:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-21 21:35 [congwang:sch_bpf 1/3] net/core/skb_map.c:264:36: warning: unused variable 'bpf_skb_map_pop_proto' 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

all inboxes | Powered by JetHome®