* [dhowells-fs:netfs-crypt 37/37] fs/netfs/crypto.c:305:38: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long'
@ 2024-09-03 15:46 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-09-03 15:46 UTC (permalink / raw)
To: David Howells; +Cc: llvm, oe-kbuild-all
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-crypt
head: 3962f4beba4e7ffa6cfab018df8a612902a1d2c8
commit: 3962f4beba4e7ffa6cfab018df8a612902a1d2c8 [37/37] netfs: Support decryption on ubuffered/DIO read
config: i386-buildonly-randconfig-003-20240903 (https://download.01.org/0day-ci/archive/20240903/202409032337.cSEMj0gq-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240903/202409032337.cSEMj0gq-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/202409032337.cSEMj0gq-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/netfs/crypto.c:305:38: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
304 | kdebug("type=%u nr=%zu type=%u nr=%zu",
| ~~~
| %lu
305 | rreq->bounce.iter.iter_type, rreq->bounce.iter.nr_segs,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
fs/netfs/internal.h:443:43: note: expanded from macro 'kdebug'
443 | #define kdebug(FMT, ...) dbgprintk(FMT, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
fs/netfs/internal.h:439:46: note: expanded from macro 'dbgprintk'
439 | printk("[%-6.6s] "FMT"\n", current->comm, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:465:60: note: expanded from macro 'printk'
465 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:437:19: note: expanded from macro 'printk_index_wrap'
437 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
fs/netfs/crypto.c:306:38: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' [-Wformat]
304 | kdebug("type=%u nr=%zu type=%u nr=%zu",
| ~~~
| %lu
305 | rreq->bounce.iter.iter_type, rreq->bounce.iter.nr_segs,
306 | rreq->buffer.iter.iter_type, rreq->buffer.iter.nr_segs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
fs/netfs/internal.h:443:43: note: expanded from macro 'kdebug'
443 | #define kdebug(FMT, ...) dbgprintk(FMT, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
fs/netfs/internal.h:439:46: note: expanded from macro 'dbgprintk'
439 | printk("[%-6.6s] "FMT"\n", current->comm, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:465:60: note: expanded from macro 'printk'
465 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
| ~~~ ^~~~~~~~~~~
include/linux/printk.h:437:19: note: expanded from macro 'printk_index_wrap'
437 | _p_func(_fmt, ##__VA_ARGS__); \
| ~~~~ ^~~~~~~~~~~
>> fs/netfs/crypto.c:283:29: warning: variable 'skip' set but not used [-Wunused-but-set-variable]
283 | size_t len, processed = 0, skip, bsize = 1UL << ctx->crypto_bshift;
| ^
3 warnings generated.
vim +305 fs/netfs/crypto.c
273
274 /*
275 * Decrypt the result of a DIO read request.
276 */
277 void netfs_decrypt_dio(struct netfs_io_request *rreq)
278 {
279 struct netfs_inode *ctx = netfs_inode(rreq->inode);
280 struct scatterlist source_sg[16], dest_sg[16];
281 unsigned long long start;
282 unsigned int n_source;
> 283 size_t len, processed = 0, skip, bsize = 1UL << ctx->crypto_bshift;
284 int ret;
285
286 trace_netfs_rreq(rreq, netfs_rreq_trace_decrypt);
287 if (rreq->start >= rreq->i_size)
288 return;
289
290 start = round_down(rreq->start, bsize);
291 skip = rreq->start - start;
292 len = round_down(rreq->transferred, bsize);
293
294 if (rreq->buffer.iter.count < rreq->len)
295 iov_iter_revert(&rreq->buffer.iter, rreq->len - rreq->buffer.iter.count);
296 if (rreq->bounce.iter.count < len)
297 iov_iter_revert(&rreq->bounce.iter, len - rreq->bounce.iter.count);
298
299 kdebug("DECRYPT %llx-%llx f=%lx %zx/%zx %zx/%llx",
300 start, start + len - 1, rreq->flags,
301 rreq->bounce.iter.count, len,
302 rreq->buffer.iter.count, rreq->len);
303
304 kdebug("type=%u nr=%zu type=%u nr=%zu",
> 305 rreq->bounce.iter.iter_type, rreq->bounce.iter.nr_segs,
--
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-09-03 15:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 15:46 [dhowells-fs:netfs-crypt 37/37] fs/netfs/crypto.c:305:38: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'unsigned long' 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