public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [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 *')
@ 2024-06-04  1:40 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-06-04  1:40 UTC (permalink / raw)
  To: Jens Axboe; +Cc: llvm, oe-kbuild-all

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-04  1:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-04  1:40 [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 *') 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