All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [axboe-block:io_uring-6.10 5/5] io_uring/napi.c:284:4: error: incompatible pointer types passing 'unsigned int *' to parameter of type 'uint64_t *' (aka 'unsigned long long *')
Date: Tue, 4 Jun 2024 09:40:49 +0800	[thread overview]
Message-ID: <202406040947.kFGqTrFC-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git io_uring-6.10
head:   104fdbcf07a71a2435c3737c57b2927d0af260af
commit: 104fdbcf07a71a2435c3737c57b2927d0af260af [5/5] io_uring/napi: fix timeout calculation
config: arm-defconfig (https://download.01.org/0day-ci/archive/20240604/202406040947.kFGqTrFC-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240604/202406040947.kFGqTrFC-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/202406040947.kFGqTrFC-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

>> io_uring/napi.c:284:4: warning: comparison of distinct pointer types ('typeof ((poll_to)) *' (aka 'unsigned int *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types]
                           do_div(poll_to, 1000);
                           ^~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/div64.h:222:28: note: expanded from macro 'do_div'
           (void)(((typeof((n)) *)0) == ((uint64_t *)0));  \
                  ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~
>> io_uring/napi.c:284:4: error: incompatible pointer types passing 'unsigned int *' to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
                           do_div(poll_to, 1000);
                           ^~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/div64.h:238:22: note: expanded from macro 'do_div'
                   __rem = __div64_32(&(n), __base);       \
                                      ^~~~
   arch/arm/include/asm/div64.h:24:45: note: passing argument to parameter 'n' here
   static inline uint32_t __div64_32(uint64_t *n, uint32_t base)
                                               ^
>> io_uring/napi.c:284:4: warning: shift count >= width of type [-Wshift-count-overflow]
                           do_div(poll_to, 1000);
                           ^~~~~~~~~~~~~~~~~~~~~
   include/asm-generic/div64.h:234:25: note: expanded from macro 'do_div'
           } else if (likely(((n) >> 32) == 0)) {          \
                                  ^  ~~
   include/linux/compiler.h:76:40: note: expanded from macro 'likely'
   # define likely(x)      __builtin_expect(!!(x), 1)
                                               ^
   2 warnings and 1 error generated.


vim +284 io_uring/napi.c

   262	
   263	/*
   264	 * __io_napi_adjust_timeout() - adjust busy loop timeout
   265	 * @ctx: pointer to io-uring context structure
   266	 * @iowq: pointer to io wait queue
   267	 * @ts: pointer to timespec or NULL
   268	 *
   269	 * Adjust the busy loop timeout according to timespec and busy poll timeout.
   270	 * If the specified NAPI timeout is bigger than the wait timeout, then adjust
   271	 * the NAPI timeout accordingly.
   272	 */
   273	void __io_napi_adjust_timeout(struct io_ring_ctx *ctx, struct io_wait_queue *iowq,
   274				      struct timespec64 *ts)
   275	{
   276		unsigned int poll_to = READ_ONCE(ctx->napi_busy_poll_to);
   277	
   278		if (ts) {
   279			struct timespec64 poll_to_ts;
   280	
   281			poll_to_ts = ns_to_timespec64(1000 * (s64)poll_to);
   282			if (timespec64_compare(ts, &poll_to_ts) < 0) {
   283				poll_to = timespec64_to_ns(ts);
 > 284				do_div(poll_to, 1000);
   285			}
   286		}
   287	
   288		iowq->napi_busy_poll_to = poll_to;
   289	}
   290	

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

                 reply	other threads:[~2024-06-04  1:41 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=202406040947.kFGqTrFC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=axboe@kernel.dk \
    --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 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.