* [bcachefs:master 16/108] lib/closure.c:22:32: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int'
@ 2024-06-21 12:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-06-21 12:34 UTC (permalink / raw)
To: Kent Overstreet; +Cc: llvm, oe-kbuild-all, Kent Overstreet
tree: https://evilpiepirate.org/git/bcachefs.git master
head: 1fc1956483665158853d3d1d5f5f54e9c0416758
commit: e5dbf4c912b9e0bae5b19460eba000bbeafc4b3f [16/108] closures: Change BUG_ON() to WARN_ON()
config: arm64-randconfig-002-20240621 (https://download.01.org/0day-ci/archive/20240621/202406212026.4RHSfZqx-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project ad79a14c9e5ec4a369eed4adf567c22cc029863f)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240621/202406212026.4RHSfZqx-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/202406212026.4RHSfZqx-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> lib/closure.c:22:32: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
21 | "closure has guard bits set: %x (%lu)",
| ~~~
| %u
22 | flags & CLOSURE_GUARD_MASK, __fls(r)))
| ^~~~~~~~
include/asm-generic/bug.h:134:29: note: expanded from macro 'WARN'
134 | __WARN_printf(TAINT_WARN, format); \
| ^~~~~~
include/asm-generic/bug.h:106:17: note: expanded from macro '__WARN_printf'
106 | __warn_printk(arg); \
| ^~~
lib/closure.c:30:37: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
29 | "closure ref hit 0 with incorrect flags set: %x (%lu)",
| ~~~
| %u
30 | flags & ~CLOSURE_DESTRUCTOR, __fls(flags));
| ^~~~~~~~~~~~
include/asm-generic/bug.h:134:29: note: expanded from macro 'WARN'
134 | __WARN_printf(TAINT_WARN, format); \
| ^~~~~~
include/asm-generic/bug.h:106:17: note: expanded from macro '__WARN_printf'
106 | __warn_printk(arg); \
| ^~~
2 warnings generated.
vim +22 lib/closure.c
15
16 static inline void closure_put_after_sub(struct closure *cl, int flags)
17 {
18 int r = flags & CLOSURE_REMAINING_MASK;
19
20 if (WARN(flags & CLOSURE_GUARD_MASK,
21 "closure has guard bits set: %x (%lu)",
> 22 flags & CLOSURE_GUARD_MASK, __fls(r)))
23 r &= ~CLOSURE_GUARD_MASK;
24
25 if (!r) {
26 smp_acquire__after_ctrl_dep();
27
28 WARN(flags & ~CLOSURE_DESTRUCTOR,
29 "closure ref hit 0 with incorrect flags set: %x (%lu)",
30 flags & ~CLOSURE_DESTRUCTOR, __fls(flags));
31
32 cl->closure_get_happened = false;
33
34 if (cl->fn && !(flags & CLOSURE_DESTRUCTOR)) {
35 atomic_set(&cl->remaining,
36 CLOSURE_REMAINING_INITIALIZER);
37 closure_queue(cl);
38 } else {
39 struct closure *parent = cl->parent;
40 closure_fn *destructor = cl->fn;
41
42 closure_debug_destroy(cl);
43
44 if (destructor)
45 destructor(&cl->work);
46
47 if (parent)
48 closure_put(parent);
49 }
50 }
51 }
52
--
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:[~2024-06-21 12:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-21 12:34 [bcachefs:master 16/108] lib/closure.c:22:32: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox