public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [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'
Date: Tue, 3 Sep 2024 23:46:31 +0800	[thread overview]
Message-ID: <202409032337.cSEMj0gq-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-09-03 15:47 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=202409032337.cSEMj0gq-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dhowells@redhat.com \
    --cc=llvm@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox