From: kernel test robot <lkp@intel.com>
To: Jonathan Curley <jcurley@purestorage.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Anna Schumaker <anna.schumaker@oracle.com>
Subject: [anna-nfs:linux-next 20/32] fs/nfs/flexfilelayout/flexfilelayout.c:614:2: error: incompatible pointer types passing 'u32 *' (aka 'unsigned int *') to parameter of type 'uint64_t *' (aka 'unsigned long long *')
Date: Thu, 18 Sep 2025 08:19:08 +0800 [thread overview]
Message-ID: <202509180839.UzAynv63-lkp@intel.com> (raw)
tree: git://git.linux-nfs.org/projects/anna/linux-nfs.git linux-next
head: 790035f57131cbc430418b4a2d3f3f24caa7c40f
commit: 67ee714244dfb06cdeab07ee624e2eeddab35067 [20/32] NFSv4/flexfiles: Commit path updates for striped layouts
config: powerpc-randconfig-003-20250918 (https://download.01.org/0day-ci/archive/20250918/202509180839.UzAynv63-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250918/202509180839.UzAynv63-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/202509180839.UzAynv63-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> fs/nfs/flexfilelayout/flexfilelayout.c:614:2: warning: comparison of distinct pointer types ('typeof ((mirror_idx)) *' (aka 'unsigned int *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types]
614 | do_div(mirror_idx, flseg->mirror_array[0]->dss_count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:183:28: note: expanded from macro 'do_div'
183 | (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
| ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
>> fs/nfs/flexfilelayout/flexfilelayout.c:614:2: error: incompatible pointer types passing 'u32 *' (aka 'unsigned int *') to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
614 | do_div(mirror_idx, flseg->mirror_array[0]->dss_count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:199:22: note: expanded from macro 'do_div'
199 | __rem = __div64_32(&(n), __base); \
| ^~~~
include/asm-generic/div64.h:174:38: note: passing argument to parameter 'dividend' here
174 | extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
| ^
>> fs/nfs/flexfilelayout/flexfilelayout.c:614:2: warning: shift count >= width of type [-Wshift-count-overflow]
614 | do_div(mirror_idx, flseg->mirror_array[0]->dss_count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:195:25: note: expanded from macro 'do_div'
195 | } else if (likely(((n) >> 32) == 0)) { \
| ^ ~~
include/linux/compiler.h:76:40: note: expanded from macro 'likely'
76 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
fs/nfs/flexfilelayout/flexfilelayout.c:625:9: warning: comparison of distinct pointer types ('typeof ((mirror_idx)) *' (aka 'unsigned int *') and 'uint64_t *' (aka 'unsigned long long *')) [-Wcompare-distinct-pointer-types]
625 | return do_div(mirror_idx, flseg->mirror_array[0]->dss_count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:183:28: note: expanded from macro 'do_div'
183 | (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \
| ~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
fs/nfs/flexfilelayout/flexfilelayout.c:625:9: error: incompatible pointer types passing 'u32 *' (aka 'unsigned int *') to parameter of type 'uint64_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types]
625 | return do_div(mirror_idx, flseg->mirror_array[0]->dss_count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:199:22: note: expanded from macro 'do_div'
199 | __rem = __div64_32(&(n), __base); \
| ^~~~
include/asm-generic/div64.h:174:38: note: passing argument to parameter 'dividend' here
174 | extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
| ^
fs/nfs/flexfilelayout/flexfilelayout.c:625:9: warning: shift count >= width of type [-Wshift-count-overflow]
625 | return do_div(mirror_idx, flseg->mirror_array[0]->dss_count);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/div64.h:195:25: note: expanded from macro 'do_div'
195 | } else if (likely(((n) >> 32) == 0)) { \
| ^ ~~
include/linux/compiler.h:76:40: note: expanded from macro 'likely'
76 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
4 warnings and 2 errors generated.
vim +614 fs/nfs/flexfilelayout/flexfilelayout.c
607
608 static u32 calc_mirror_idx_from_commit(struct pnfs_layout_segment *lseg,
609 u32 commit_index)
610 {
611 struct nfs4_ff_layout_segment *flseg = FF_LAYOUT_LSEG(lseg);
612 u32 mirror_idx = commit_index;
613
> 614 do_div(mirror_idx, flseg->mirror_array[0]->dss_count);
615
616 return mirror_idx;
617 }
618
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-09-18 0:19 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=202509180839.UzAynv63-lkp@intel.com \
--to=lkp@intel.com \
--cc=anna.schumaker@oracle.com \
--cc=jcurley@purestorage.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