drivers/infiniband/core/ib_core_uverbs.c:430:16: sparse: sparse: incorrect type in return expression (different modifiers)

From: kernel test robot

Date: Mon Jun 22 2026 - 19:36:33 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4708cac0e22cfd217f48f7cec3c35e5922efcccd
commit: 01f99f8c4a0adec6875f192702a57c5e88978af5 RDMA/core: Move the _ib_copy_validate_udata* functions to ib_core_uverbs
date: 5 weeks ago
config: x86_64-randconfig-122-20260618 (https://download.01.org/0day-ci/archive/20260623/202606230708.oBFhjnbi-lkp@xxxxxxxxx/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260623/202606230708.oBFhjnbi-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: 01f99f8c4a0a ("RDMA/core: Move the _ib_copy_validate_udata* functions to ib_core_uverbs")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606230708.oBFhjnbi-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/infiniband/core/ib_core_uverbs.c:430:16: sparse: sparse: incorrect type in return expression (different modifiers) @@ expected int ( * )( ... ) @@ got int ( [noderef] *__v )( ... ) @@
drivers/infiniband/core/ib_core_uverbs.c:430:16: sparse: expected int ( * )( ... )
drivers/infiniband/core/ib_core_uverbs.c:430:16: sparse: got int ( [noderef] *__v )( ... )

vim +430 drivers/infiniband/core/ib_core_uverbs.c

419
420 #if IS_ENABLED(CONFIG_INFINIBAND_USER_ACCESS)
421 uverbs_api_ioctl_handler_fn uverbs_get_handler_fn(struct ib_udata *udata)
422 {
423 struct uverbs_attr_bundle *bundle =
424 rdma_udata_to_uverbs_attr_bundle(udata);
425 struct bundle_priv *pbundle =
426 container_of(&bundle->hdr, struct bundle_priv, bundle);
427
428 lockdep_assert_held(&bundle->ufile->device->disassociate_srcu);
429
> 430 return srcu_dereference(pbundle->method_elm->handler,
431 &bundle->ufile->device->disassociate_srcu);
432 }
433

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