* [jlayton:dir-deleg 42/43] fs/nfsd/nfs4state.c:9707:56: warning: format specifies type 'long' but the argument has type 'int'
@ 2025-05-22 14:34 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-22 14:34 UTC (permalink / raw)
To: Jeff Layton; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git dir-deleg
head: 0c6668479bba48114e5031d6fb3db53d80d8d6ad
commit: 1a1ed17116bff2122995a9a1f09e5c4df41b2997 [42/43] DEBUG: trace_printks all over the place
config: i386-buildonly-randconfig-001-20250522 (https://download.01.org/0day-ci/archive/20250522/202505222243.QDfjEgah-lkp@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250522/202505222243.QDfjEgah-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/202505222243.QDfjEgah-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/nfsd/nfs4state.c:9707:56: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
9707 | trace_printk("encoded remove4 is %ld bytes long\n", (u8 *)stream->p - p);
| ~~~ ^~~~~~~~~~~~~~~~~~~
| %d
include/linux/kernel.h:275:26: note: expanded from macro 'trace_printk'
275 | do_trace_printk(fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
include/linux/kernel.h:286:37: note: expanded from macro 'do_trace_printk'
286 | __trace_printk_check_format(fmt, ##args); \
| ~~~ ^~~~
include/linux/kernel.h:238:40: note: expanded from macro '__trace_printk_check_format'
238 | ____trace_printk_check_format(fmt, ##args); \
| ~~~ ^~~~
>> fs/nfsd/nfs4state.c:9707:56: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
9707 | trace_printk("encoded remove4 is %ld bytes long\n", (u8 *)stream->p - p);
| ~~~ ^~~~~~~~~~~~~~~~~~~
| %d
include/linux/kernel.h:275:26: note: expanded from macro 'trace_printk'
275 | do_trace_printk(fmt, ##__VA_ARGS__); \
| ~~~ ^~~~~~~~~~~
include/linux/kernel.h:291:36: note: expanded from macro 'do_trace_printk'
291 | __trace_printk(_THIS_IP_, fmt, ##args); \
| ~~~ ^~~~
2 warnings generated.
vim +9707 fs/nfsd/nfs4state.c
9645
9646 int
9647 nfsd_handle_dir_event(u32 mask, const struct inode *inode, const struct inode *dir,
9648 const struct qstr *name)
9649 {
9650 struct file_lock_context *ctx;
9651 struct file_lock_core *flc;
9652
9653 trace_nfsd_file_fsnotify_handle_dir_event(inode, dir, mask);
9654
9655 ctx = locks_inode_context(dir);
9656 if (!ctx || list_empty(&ctx->flc_lease)) {
9657 trace_printk("no ctx or list_empty\n");
9658 return 0;
9659 }
9660
9661 /*
9662 * Do getattr against @inode, and then generate an fattr4. Use that as the
9663 * ne_attrs in the notify_entry4's.
9664 */
9665 spin_lock(&ctx->flc_lock);
9666 list_for_each_entry(flc, &ctx->flc_lease, flc_list) {
9667 struct file_lease *fl = container_of(flc, struct file_lease, c);
9668 struct nfs4_delegation *dp = flc->flc_owner;
9669 struct nfsd4_cb_notify *ncn = &dp->dl_cb_notify;
9670 struct nfsd4_notify_spool *nns = ncn->ncn_gather;
9671 struct xdr_stream *stream = &nns->nns_stream;
9672 static uint32_t zerobm = 0;
9673
9674 trace_printk("considering fl=%p\n", fl);
9675 if (fl->fl_lmops != &nfsd_dir_lease_mng_ops) {
9676 trace_printk("fl_lmops doesn't match\n");
9677 continue;
9678 }
9679
9680 /* If no buffer or slots are available, give up and break the deleg */
9681 if (!nns || nns->nns_idx >= NFSD4_NOTIFY_SPOOL_SZ) {
9682 trace_printk("no buffer");
9683 nfsd_break_deleg_cb(fl);
9684 continue;
9685 }
9686
9687 if (mask & FS_DELETE) {
9688 static uint32_t notify_remove_bitmap = BIT(NOTIFY4_REMOVE_ENTRY);
9689 struct notify4 *ent = &nns->nns_ent[nns->nns_idx];
9690 struct notify_remove4 nr = { };
9691 u8 *p = (u8 *)(stream->p);
9692
9693 if (!(flc->flc_flags & FL_IGN_DIR_DELETE)) {
9694 trace_printk("FL_IGN_DIR_DELETE not set\n");
9695 continue;
9696 }
9697
9698 nr.nrm_old_entry.ne_file.len = name->len;
9699 nr.nrm_old_entry.ne_file.data = (char *)name->name;
9700 nr.nrm_old_entry.ne_attrs.attrmask.count = 1;
9701 nr.nrm_old_entry.ne_attrs.attrmask.element = &zerobm;
9702 if (!xdrgen_encode_notify_remove4(stream, &nr)) {
9703 pr_warn("nfsd: unable to marshal notify_remove4 to xdr stream\n");
9704 continue;
9705 }
9706
> 9707 trace_printk("encoded remove4 is %ld bytes long\n", (u8 *)stream->p - p);
--
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:[~2025-05-22 14:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 14:34 [jlayton:dir-deleg 42/43] fs/nfsd/nfs4state.c:9707:56: warning: format specifies type 'long' but the argument has type '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