From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev,
Kent Overstreet <kent.overstreet@linux.dev>
Subject: [bcachefs:master 16/108] lib/closure.c:21:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'int'
Date: Fri, 21 Jun 2024 23:44:53 +0800 [thread overview]
Message-ID: <202406212351.m2FOlpMW-lkp@intel.com> (raw)
tree: https://evilpiepirate.org/git/bcachefs.git master
head: 1fc1956483665158853d3d1d5f5f54e9c0416758
commit: e5dbf4c912b9e0bae5b19460eba000bbeafc4b3f [16/108] closures: Change BUG_ON() to WARN_ON()
config: sparc64-randconfig-002-20240621 (https://download.01.org/0day-ci/archive/20240621/202406212351.m2FOlpMW-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240621/202406212351.m2FOlpMW-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/202406212351.m2FOlpMW-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/sparc/include/asm/bug.h:25,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from arch/sparc/include/asm/current.h:15,
from include/linux/sched.h:12,
from include/linux/closure.h:6,
from lib/closure.c:9:
lib/closure.c: In function 'closure_put_after_sub':
>> lib/closure.c:21:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'int' [-Wformat=]
21 | "closure has guard bits set: %x (%lu)",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 | flags & CLOSURE_GUARD_MASK, __fls(r)))
| ~~~~~~~~
| |
| int
include/asm-generic/bug.h:99:62: note: in definition of macro '__WARN_printf'
99 | warn_slowpath_fmt(__FILE__, __LINE__, taint, arg); \
| ^~~
lib/closure.c:20:13: note: in expansion of macro 'WARN'
20 | if (WARN(flags & CLOSURE_GUARD_MASK,
| ^~~~
lib/closure.c:21:53: note: format string is defined here
21 | "closure has guard bits set: %x (%lu)",
| ~~^
| |
| long unsigned int
| %u
lib/closure.c:29:22: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type 'int' [-Wformat=]
29 | "closure ref hit 0 with incorrect flags set: %x (%lu)",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30 | flags & ~CLOSURE_DESTRUCTOR, __fls(flags));
| ~~~~~~~~~~~~
| |
| int
include/asm-generic/bug.h:99:62: note: in definition of macro '__WARN_printf'
99 | warn_slowpath_fmt(__FILE__, __LINE__, taint, arg); \
| ^~~
lib/closure.c:28:17: note: in expansion of macro 'WARN'
28 | WARN(flags & ~CLOSURE_DESTRUCTOR,
| ^~~~
lib/closure.c:29:73: note: format string is defined here
29 | "closure ref hit 0 with incorrect flags set: %x (%lu)",
| ~~^
| |
| long unsigned int
| %u
vim +21 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
reply other threads:[~2024-06-21 15:45 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=202406212351.m2FOlpMW-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@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.