From: kernel test robot <lkp@intel.com>
To: Alexei Starovoitov <ast@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [ast-bpf:ma_v4 6/7] kernel/bpf/memalloc.c:340:26: warning: unused variable 'batch'
Date: Fri, 9 Jun 2023 10:48:06 +0800 [thread overview]
Message-ID: <202306091027.SSx9CKaB-lkp@intel.com> (raw)
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
reply other threads:[~2023-06-09 2:48 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=202306091027.SSx9CKaB-lkp@intel.com \
--to=lkp@intel.com \
--cc=ast@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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 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.