fs/f2fs/checkpoint.c:784:57: sparse: sparse: incorrect type in argument 1 (different address spaces)

From: kernel test robot

Date: Tue Sep 08 2026 - 00:41:03 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 28924df2a08f440c73991b83028032c901de2ae4
commit: 9a9ee7408a1f8271bd1978baff2dd09457054ef4 f2fs: reduce memory footprint of ino management
date: 3 weeks ago
config: parisc-randconfig-r132-20260908 (https://download.01.org/0day-ci/archive/20260908/202609081243.Jo4beeqD-lkp@xxxxxxxxx/config)
compiler: hppa-linux-gcc (GCC) 10.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260908/202609081243.Jo4beeqD-lkp@xxxxxxxxx/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
| Fixes: 9a9ee7408a1f ("f2fs: reduce memory footprint of ino management")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609081243.Jo4beeqD-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
fs/f2fs/checkpoint.c:782:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void **slot @@ got void [noderef] __rcu ** @@
fs/f2fs/checkpoint.c:782:14: sparse: expected void **slot
fs/f2fs/checkpoint.c:782:14: sparse: got void [noderef] __rcu **
>> fs/f2fs/checkpoint.c:784:57: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __rcu **slot @@ got void **slot @@
fs/f2fs/checkpoint.c:784:57: sparse: expected void [noderef] __rcu **slot
fs/f2fs/checkpoint.c:784:57: sparse: got void **slot
fs/f2fs/checkpoint.c:789:64: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __rcu **slot @@ got void **slot @@
fs/f2fs/checkpoint.c:789:64: sparse: expected void [noderef] __rcu **slot
fs/f2fs/checkpoint.c:789:64: sparse: got void **slot
fs/f2fs/checkpoint.c:810:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void **slot @@ got void [noderef] __rcu ** @@
fs/f2fs/checkpoint.c:810:14: sparse: expected void **slot
fs/f2fs/checkpoint.c:810:14: sparse: got void [noderef] __rcu **
fs/f2fs/checkpoint.c:812:57: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __rcu **slot @@ got void **slot @@
fs/f2fs/checkpoint.c:812:57: sparse: expected void [noderef] __rcu **slot
fs/f2fs/checkpoint.c:812:57: sparse: got void **slot
fs/f2fs/checkpoint.c:819:64: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void [noderef] __rcu **slot @@ got void **slot @@
fs/f2fs/checkpoint.c:819:64: sparse: expected void [noderef] __rcu **slot
fs/f2fs/checkpoint.c:819:64: sparse: got void **slot

vim +784 fs/f2fs/checkpoint.c

768
769 static void __set_ino_bitmap(struct f2fs_sb_info *sbi, nid_t ino, int type)
770 {
771 struct inode_management *im = &sbi->im[type];
772 unsigned long index = INO_SLOT_INDEX(ino);
773 unsigned int ofs = INO_BIT_OFFSET(ino);
774 void **slot, *entry;
775 unsigned long bitmap = 0;
776 int ret;
777
778 ret = radix_tree_preload(GFP_NOFS | __GFP_NOFAIL);
779 f2fs_bug_on(sbi, ret);
780
781 spin_lock(&im->ino_lock);
782 slot = radix_tree_lookup_slot(&im->ino_root, index);
783 if (slot) {
> 784 entry = radix_tree_deref_slot_protected(slot, &im->ino_lock);
785 bitmap = xa_to_value(entry);
786 if (!(bitmap & (1UL << ofs))) {
787 bitmap |= (1UL << ofs);
788 entry = xa_mk_value(bitmap);
789 radix_tree_replace_slot(&im->ino_root, slot, entry);
790 }
791 } else {
792 bitmap |= (1UL << ofs);
793 entry = xa_mk_value(bitmap);
794 if (unlikely(radix_tree_insert(&im->ino_root, index, entry)))
795 f2fs_bug_on(sbi, 1);
796 }
797 spin_unlock(&im->ino_lock);
798 radix_tree_preload_end();
799 }
800

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