From: kernel test robot <lkp@intel.com>
To: Kent Overstreet <kent.overstreet@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev,
Kent Overstreet <kent.overstreet@linux.dev>
Subject: [bcachefs:bcachefs-testing 461/692] fs/bcachefs/util/darray.c:35:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
Date: Mon, 27 Oct 2025 05:20:44 +0800 [thread overview]
Message-ID: <202510270541.ivtwU7Ze-lkp@intel.com> (raw)
tree: https://evilpiepirate.org/git/bcachefs.git bcachefs-testing
head: 1df63c2414a8b3e8cc16e06582990371d7f38609
commit: a5c2f21bff6a883e2a0fc96e4f0127350186665e [461/692] bcachefs: move utility code to subdir
config: powerpc-randconfig-r112-20251026 (https://download.01.org/0day-ci/archive/20251027/202510270541.ivtwU7Ze-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251027/202510270541.ivtwU7Ze-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/202510270541.ivtwU7Ze-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/bcachefs/util/darray.c:35:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
fs/bcachefs/util/darray.c:35:17: sparse: char [noderef] __rcu *
fs/bcachefs/util/darray.c:35:17: sparse: char *
vim +35 fs/bcachefs/util/darray.c
73ab9e03861c22 fs/bcachefs/darray.c Kent Overstreet 2023-11-08 8
68230270e04d5e fs/bcachefs/darray.c Kent Overstreet 2025-08-13 9 int __bch2_darray_resize_noprof(darray_char *d, size_t element_size, size_t new_size, gfp_t gfp,
68230270e04d5e fs/bcachefs/darray.c Kent Overstreet 2025-08-13 10 bool rcu)
73ab9e03861c22 fs/bcachefs/darray.c Kent Overstreet 2023-11-08 11 {
73ab9e03861c22 fs/bcachefs/darray.c Kent Overstreet 2023-11-08 12 if (new_size > d->size) {
73ab9e03861c22 fs/bcachefs/darray.c Kent Overstreet 2023-11-08 13 new_size = roundup_pow_of_two(new_size);
73ab9e03861c22 fs/bcachefs/darray.c Kent Overstreet 2023-11-08 14
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 15 /*
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 16 * This is a workaround: kvmalloc() doesn't support > INT_MAX
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 17 * allocations, but vmalloc() does.
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 18 * The limit needs to be lifted from kvmalloc, and when it does
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 19 * we'll go back to just using that.
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 20 */
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 21 size_t bytes;
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 22 if (unlikely(check_mul_overflow(new_size, element_size, &bytes)))
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 23 return -ENOMEM;
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 24
68230270e04d5e fs/bcachefs/darray.c Kent Overstreet 2025-08-13 25 void *old = d->data;
68230270e04d5e fs/bcachefs/darray.c Kent Overstreet 2025-08-13 26 void *new = likely(bytes < INT_MAX)
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 27 ? kvmalloc_noprof(bytes, gfp)
f0d3302073e60b fs/bcachefs/darray.c Kent Overstreet 2024-10-19 28 : vmalloc_noprof(bytes);
68230270e04d5e fs/bcachefs/darray.c Kent Overstreet 2025-08-13 29 if (!new)
73ab9e03861c22 fs/bcachefs/darray.c Kent Overstreet 2023-11-08 30 return -ENOMEM;
73ab9e03861c22 fs/bcachefs/darray.c Kent Overstreet 2023-11-08 31
2e118ba36d56ac fs/bcachefs/darray.c Tavian Barnes 2024-06-21 32 if (d->size)
68230270e04d5e fs/bcachefs/darray.c Kent Overstreet 2025-08-13 33 memcpy(new, old, d->size * element_size);
68230270e04d5e fs/bcachefs/darray.c Kent Overstreet 2025-08-13 34
68230270e04d5e fs/bcachefs/darray.c Kent Overstreet 2025-08-13 @35 rcu_assign_pointer(d->data, new);
:::::: The code at line 35 was first introduced by commit
:::::: 68230270e04d5ebe026e89137d23bed6201bae6c bcachefs: darray_make_room_rcu()
:::::: TO: Kent Overstreet <kent.overstreet@linux.dev>
:::::: CC: Kent Overstreet <kent.overstreet@linux.dev>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-10-26 21:21 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=202510270541.ivtwU7Ze-lkp@intel.com \
--to=lkp@intel.com \
--cc=kent.overstreet@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.