From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [paulmckrcu:dev 82/82] kernel/rcu/rcutorture.c:2453:110: warning: format specifies type 'unsigned long' but the argument has type 'int'
Date: Tue, 11 Feb 2025 20:37:12 +0800 [thread overview]
Message-ID: <202502112058.rTKa7Z3A-lkp@intel.com> (raw)
tree: https://github.com/paulmckrcu/linux dev
head: 31c00ec5301cf02af354d57007bf0d79d5aef1c5
commit: 31c00ec5301cf02af354d57007bf0d79d5aef1c5 [82/82] rcutorture: Check for ->up_read() without matching ->down_read()
config: i386-buildonly-randconfig-006-20250211 (https://download.01.org/0day-ci/archive/20250211/202502112058.rTKa7Z3A-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250211/202502112058.rTKa7Z3A-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/202502112058.rTKa7Z3A-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from kernel/rcu/rcutorture.c:47:
In file included from include/linux/oom.h:10:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> kernel/rcu/rcutorture.c:2453:110: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
2453 | WARN_ONCE(rtorsup->rtorsu_nups >= rtorsup->rtorsu_ndowns, "%s: Up without matching down #%lu.\n", __func__, rtorsup - updownreaders);
| ~~~ ^~~~~~~~~~~~~~~~~~~~~~~
| %d
include/asm-generic/bug.h:185:57: note: expanded from macro 'WARN_ONCE'
185 | #define WARN_ONCE(condition, format...) WARN(condition, format)
| ^~~~~~
include/asm-generic/bug.h:179:12: note: expanded from macro 'WARN'
179 | no_printk(format); \
| ^~~~~~
include/linux/printk.h:135:18: note: expanded from macro 'no_printk'
135 | _printk(fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
kernel/rcu/rcutorture.c:2524:111: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
2524 | WARN_ONCE(rtorsup->rtorsu_nups >= rtorsup->rtorsu_ndowns, "%s: Up without matching down #%lu.\n", __func__, rtorsup - updownreaders);
| ~~~ ^~~~~~~~~~~~~~~~~~~~~~~
| %d
include/asm-generic/bug.h:185:57: note: expanded from macro 'WARN_ONCE'
185 | #define WARN_ONCE(condition, format...) WARN(condition, format)
| ^~~~~~
include/asm-generic/bug.h:179:12: note: expanded from macro 'WARN'
179 | no_printk(format); \
| ^~~~~~
include/linux/printk.h:135:18: note: expanded from macro 'no_printk'
135 | _printk(fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
3 warnings generated.
vim +2453 kernel/rcu/rcutorture.c
2446
2447 static enum hrtimer_restart rcu_torture_updown_hrt(struct hrtimer *hrtp)
2448 {
2449 struct rcu_torture_one_read_state_updown *rtorsup;
2450
2451 rtorsup = container_of(hrtp, struct rcu_torture_one_read_state_updown, rtorsu_hrt);
2452 rcu_torture_one_read_end(&rtorsup->rtorsu_rtors, &rtorsup->rtorsu_trs, -1);
> 2453 WARN_ONCE(rtorsup->rtorsu_nups >= rtorsup->rtorsu_ndowns, "%s: Up without matching down #%lu.\n", __func__, rtorsup - updownreaders);
2454 rtorsup->rtorsu_nups++;
2455 smp_store_release(&rtorsup->rtorsu_inuse, false);
2456 return HRTIMER_NORESTART;
2457 }
2458
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2025-02-11 12:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 12:37 kernel test robot [this message]
2025-02-12 10:03 ` [paulmckrcu:dev 82/82] kernel/rcu/rcutorture.c:2453:110: warning: format specifies type 'unsigned long' but the argument has type 'int' Paul E. McKenney
2025-02-13 5:51 ` Oliver Sang
2025-02-13 7:56 ` Paul E. McKenney
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=202502112058.rTKa7Z3A-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paulmck@kernel.org \
/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