llvm.lists.linux.dev archive mirror
 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-writeback 21/21] fs/netfs/write_issue.c:236:33: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int')
Date: Sun, 10 Mar 2024 05:36:33 +0800	[thread overview]
Message-ID: <202403100554.A1U8HTG3-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git netfs-writeback
head:   4b19245d19affeb7108cfd195f1523e575ca62ce
commit: 4b19245d19affeb7108cfd195f1523e575ca62ce [21/21] netfs: Use writeback_iter() and improve the writeback algorithm
config: i386-buildonly-randconfig-004-20240310 (https://download.01.org/0day-ci/archive/20240310/202403100554.A1U8HTG3-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240310/202403100554.A1U8HTG3-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/202403100554.A1U8HTG3-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/netfs/write_issue.c:236:33: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
     236 |         _debug("part %lx/%lx %lx/%lx", subreq->len, subreq->max_len, part, len);
         |                      ~~~               ^~~~~~~~~~~
         |                      %zx
   fs/netfs/internal.h:396:43: note: expanded from macro '_debug'
     396 | #define _debug(FMT, ...) no_printk(FMT, ##__VA_ARGS__)
         |                                    ~~~    ^~~~~~~~~~~
   include/linux/printk.h:129:17: note: expanded from macro 'no_printk'
     129 |                 printk(fmt, ##__VA_ARGS__);             \
         |                        ~~~    ^~~~~~~~~~~
   include/linux/printk.h:455:60: note: expanded from macro 'printk'
     455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   fs/netfs/write_issue.c:236:46: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
     236 |         _debug("part %lx/%lx %lx/%lx", subreq->len, subreq->max_len, part, len);
         |                          ~~~                        ^~~~~~~~~~~~~~~
         |                          %zx
   fs/netfs/internal.h:396:43: note: expanded from macro '_debug'
     396 | #define _debug(FMT, ...) no_printk(FMT, ##__VA_ARGS__)
         |                                    ~~~    ^~~~~~~~~~~
   include/linux/printk.h:129:17: note: expanded from macro 'no_printk'
     129 |                 printk(fmt, ##__VA_ARGS__);             \
         |                        ~~~    ^~~~~~~~~~~
   include/linux/printk.h:455:60: note: expanded from macro 'printk'
     455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   fs/netfs/write_issue.c:236:63: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
     236 |         _debug("part %lx/%lx %lx/%lx", subreq->len, subreq->max_len, part, len);
         |                              ~~~                                     ^~~~
         |                              %zx
   fs/netfs/internal.h:396:43: note: expanded from macro '_debug'
     396 | #define _debug(FMT, ...) no_printk(FMT, ##__VA_ARGS__)
         |                                    ~~~    ^~~~~~~~~~~
   include/linux/printk.h:129:17: note: expanded from macro 'no_printk'
     129 |                 printk(fmt, ##__VA_ARGS__);             \
         |                        ~~~    ^~~~~~~~~~~
   include/linux/printk.h:455:60: note: expanded from macro 'printk'
     455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   fs/netfs/write_issue.c:236:69: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
     236 |         _debug("part %lx/%lx %lx/%lx", subreq->len, subreq->max_len, part, len);
         |                                  ~~~                                       ^~~
         |                                  %zx
   fs/netfs/internal.h:396:43: note: expanded from macro '_debug'
     396 | #define _debug(FMT, ...) no_printk(FMT, ##__VA_ARGS__)
         |                                    ~~~    ^~~~~~~~~~~
   include/linux/printk.h:129:17: note: expanded from macro 'no_printk'
     129 |                 printk(fmt, ##__VA_ARGS__);             \
         |                        ~~~    ^~~~~~~~~~~
   include/linux/printk.h:455:60: note: expanded from macro 'printk'
     455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   fs/netfs/write_issue.c:522:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
     522 |         _enter("%lx", len);
         |                 ~~~   ^~~
         |                 %zx
   fs/netfs/internal.h:394:65: note: expanded from macro '_enter'
     394 | #define _enter(FMT, ...) no_printk("==> %s("FMT")", __func__, ##__VA_ARGS__)
         |                                             ~~~                 ^~~~~~~~~~~
   include/linux/printk.h:129:17: note: expanded from macro 'no_printk'
     129 |                 printk(fmt, ##__VA_ARGS__);             \
         |                        ~~~    ^~~~~~~~~~~
   include/linux/printk.h:455:60: note: expanded from macro 'printk'
     455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   fs/netfs/write_issue.c:530:28: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
     530 |                 _debug("unbuffered %lx", len);
         |                                    ~~~   ^~~
         |                                    %zx
   fs/netfs/internal.h:396:43: note: expanded from macro '_debug'
     396 | #define _debug(FMT, ...) no_printk(FMT, ##__VA_ARGS__)
         |                                    ~~~    ^~~~~~~~~~~
   include/linux/printk.h:129:17: note: expanded from macro 'no_printk'
     129 |                 printk(fmt, ##__VA_ARGS__);             \
         |                        ~~~    ^~~~~~~~~~~
   include/linux/printk.h:455:60: note: expanded from macro 'printk'
     455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   6 warnings generated.
--
>> fs/netfs/direct_write.c:40:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
      40 |         _enter("%lx", iov_iter_count(iter));
         |                 ~~~   ^~~~~~~~~~~~~~~~~~~~
         |                 %zx
   fs/netfs/internal.h:394:65: note: expanded from macro '_enter'
     394 | #define _enter(FMT, ...) no_printk("==> %s("FMT")", __func__, ##__VA_ARGS__)
         |                                             ~~~                 ^~~~~~~~~~~
   include/linux/printk.h:129:17: note: expanded from macro 'no_printk'
     129 |                 printk(fmt, ##__VA_ARGS__);             \
         |                        ~~~    ^~~~~~~~~~~
   include/linux/printk.h:455:60: note: expanded from macro 'printk'
     455 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                                                     ~~~    ^~~~~~~~~~~
   include/linux/printk.h:427:19: note: expanded from macro 'printk_index_wrap'
     427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ~~~~    ^~~~~~~~~~~
   1 warning generated.


vim +236 fs/netfs/write_issue.c

   205	
   206	/*
   207	 * Add data to the write subrequest, dispatching each as we fill it up or if it
   208	 * is discontiguous with the previous.  We only fill one part at a time so that
   209	 * we can avoid overrunning the credits obtained (cifs) and try to parallelise
   210	 * content-crypto preparation with network writes.
   211	 */
   212	int netfs_advance_write(struct netfs_io_request *wreq,
   213				struct netfs_io_stream *stream,
   214				loff_t start, size_t len, bool to_eof)
   215	{
   216		struct netfs_io_subrequest *subreq = stream->construct;
   217		size_t part;
   218	
   219		if (!stream->avail) {
   220			_leave("no write");
   221			return len;
   222		}
   223	
   224		_enter("R=%x[%x]", wreq->debug_id, subreq ? subreq->debug_index : 0x99);
   225	
   226		if (subreq && start != subreq->start + subreq->len) {
   227			netfs_issue_write(wreq, stream);
   228			subreq = NULL;
   229		}
   230	
   231		if (!stream->construct)
   232			netfs_prepare_write(wreq, stream, start);
   233		subreq = stream->construct;
   234	
   235		part = min(subreq->max_len - subreq->len, len);
 > 236		_debug("part %lx/%lx %lx/%lx", subreq->len, subreq->max_len, part, len);
   237		subreq->len += part;
   238		subreq->nr_segs++;
   239	
   240		if (subreq->len >= subreq->max_len ||
   241		    subreq->nr_segs >= subreq->max_nr_segs ||
   242		    to_eof) {
   243			netfs_issue_write(wreq, stream);
   244			subreq = NULL;
   245		}
   246	
   247		return part;
   248	}
   249	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-03-09 21:36 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=202403100554.A1U8HTG3-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;
as well as URLs for NNTP newsgroup(s).