All of lore.kernel.org
 help / color / mirror / Atom feed
* [ast-bpf:ma_v4 6/7] kernel/bpf/memalloc.c:340:26: warning: unused variable 'batch'
@ 2023-06-09  2:48 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-06-09  2:48 UTC (permalink / raw)
  To: Alexei Starovoitov; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git ma_v4
head:   86c9deee3b8263f7546b8bad1e1a8d9662503ded
commit: 45acfe8484365cc1aa89e3d676697ce69ff4169b [6/7] hack 3
config: x86_64-randconfig-r021-20230608 (https://download.01.org/0day-ci/archive/20230609/202306091027.SSx9CKaB-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/commit/?id=45acfe8484365cc1aa89e3d676697ce69ff4169b
        git remote add ast-bpf https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git
        git fetch --no-tags ast-bpf ma_v4
        git checkout 45acfe8484365cc1aa89e3d676697ce69ff4169b
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/bpf/

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306091027.SSx9CKaB-lkp@intel.com/

All warnings (new ones prefixed by >>):

   kernel/bpf/memalloc.c:307:6: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
           int cnt;
               ^
   kernel/bpf/memalloc.c:327:6: warning: variable 'cnt' set but not used [-Wunused-but-set-variable]
           int cnt;
               ^
>> kernel/bpf/memalloc.c:340:26: warning: unused variable 'batch' [-Wunused-variable]
           struct bpf_reuse_batch *batch;
                                   ^
   kernel/bpf/memalloc.c:323:13: warning: unused function 'bpf_ma_reuse_tt_cb' [-Wunused-function]
   static void bpf_ma_reuse_tt_cb(struct rcu_head *rcu)
               ^
   4 warnings generated.


vim +/batch +340 kernel/bpf/memalloc.c

   334	
   335	
   336	static void bpf_ma_add_to_reuse_ready_or_free(struct bpf_mem_cache *c)
   337	{
   338		struct bpf_mem_shared_cache *sc = c->sc;
   339		struct llist_node *head, *tail;
 > 340		struct bpf_reuse_batch *batch;
   341		unsigned long flags;
   342	
   343		/* Draining could be running concurrently with reuse_rcu() */
   344		raw_spin_lock_irqsave(&c->lock, flags);
   345		head = __llist_del_all(&c->waiting_for_gp);
   346		tail = c->waiting_for_gp_tail;
   347		c->waiting_for_gp_tail = NULL;
   348		raw_spin_unlock_irqrestore(&c->lock, flags);
   349		/* Draining is in progress ? */
   350		if (!head)
   351			return;
   352	
   353		if (llist_empty(&c->reuse_ready_head))
   354			c->reuse_ready_tail = tail;
   355		__llist_add_batch(head, tail, &c->reuse_ready_head);
   356	
   357		/* Don't move these objects to reuse_ready list and free
   358		 * these objects directly.
   359		 */
   360	/*	if (sc->direct_free) {
   361			free_all(head, sc->percpu);
   362			return;
   363		}*/
   364	/*		local_irq_save(flags);
   365			rcu_momentary_dyntick_idle();
   366			local_irq_restore(flags);*/
   367	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

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

only message in thread, other threads:[~2023-06-09  2:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-09  2:48 [ast-bpf:ma_v4 6/7] kernel/bpf/memalloc.c:340:26: warning: unused variable 'batch' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.