From: kernel test robot <lkp@intel.com>
To: Boqun Feng <boqun@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [boqun:rust-sync 9/12] arch/mips/kernel/traps.c:2002:2: warning: unused variable 'nesting'
Date: Wed, 06 May 2026 08:04:53 +0800 [thread overview]
Message-ID: <202605060744.4CMiPCaU-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux.git rust-sync
head: 082cc4c201e4450ff9456c9bd093fd70d103595a
commit: 40c3e04e2248c0e5d78d23e6767a1c58d5678eac [9/12] preempt: x86: Avoid tracking NMI separately when 64BIT=y
config: mips-randconfig-r072-20260506 (https://download.01.org/0day-ci/archive/20260506/202605060744.4CMiPCaU-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
smatch: v0.5.0-9065-ge9cc34fd
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260506/202605060744.4CMiPCaU-lkp@intel.com/reproduce)
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/202605060744.4CMiPCaU-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/mips/kernel/traps.c:1592:17: warning: variable 'prev_state' set but not used [-Wunused-but-set-variable]
1592 | enum ctx_state prev_state;
| ^
>> arch/mips/kernel/traps.c:2002:2: warning: unused variable 'nesting' [-Wunused-variable]
2002 | nmi_exit();
| ^~~~~~~~~~
include/linux/hardirq.h:164:3: note: expanded from macro 'nmi_exit'
164 | __nmi_exit(); \
| ^~~~~~~~~~~~
include/linux/hardirq.h:150:16: note: expanded from macro '__nmi_exit'
150 | unsigned int nesting; \
| ^~~~~~~
2 warnings generated.
vim +/nesting +2002 arch/mips/kernel/traps.c
34bd92e27becdc Kevin Cernekee 2011-11-16 1990
ff2d8b19a3a625 Joe Perches 2012-01-12 1991 void __noreturn nmi_exception_handler(struct pt_regs *regs)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1992 {
83e4da1ed45441 Leonid Yegoshin 2013-10-08 1993 char str[100];
83e4da1ed45441 Leonid Yegoshin 2013-10-08 1994
7963b3f127a748 Petri Gynther 2015-10-19 1995 nmi_enter();
34bd92e27becdc Kevin Cernekee 2011-11-16 1996 raw_notifier_call_chain(&nmi_chain, 0, regs);
41c594ab65fc89 Ralf Baechle 2006-04-05 1997 bust_spinlocks(1);
83e4da1ed45441 Leonid Yegoshin 2013-10-08 1998 snprintf(str, 100, "CPU%d NMI taken, CP0_EPC=%lx\n",
83e4da1ed45441 Leonid Yegoshin 2013-10-08 1999 smp_processor_id(), regs->cp0_epc);
83e4da1ed45441 Leonid Yegoshin 2013-10-08 2000 regs->cp0_epc = read_c0_errorepc();
83e4da1ed45441 Leonid Yegoshin 2013-10-08 2001 die(str, regs);
7963b3f127a748 Petri Gynther 2015-10-19 @2002 nmi_exit();
^1da177e4c3f41 Linus Torvalds 2005-04-16 2003 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2004
:::::: The code at line 2002 was first introduced by commit
:::::: 7963b3f127a7486815bc10639630c95c2792b811 MIPS: add nmi_enter() + nmi_exit() to nmi_exception_handler()
:::::: TO: Petri Gynther <pgynther@google.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-05-06 0:05 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=202605060744.4CMiPCaU-lkp@intel.com \
--to=lkp@intel.com \
--cc=boqun@kernel.org \
--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.