mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: [congwang:sch_bpf 1/3] net/core/skb_map.c:264:36: warning: unused variable 'bpf_skb_map_pop_proto'
Date: Sun, 22 May 2022 05:35:05 +0800	[thread overview]
Message-ID: <202205220540.iNtltJFv-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-05-21 21:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202205220540.iNtltJFv-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®