mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/nvmem/core.c:1061:15: sparse: sparse: incorrect type in initializer (different base types)
@ 2026-12-06 11:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-12-06 11:28 UTC (permalink / raw)
  To: Bartosz Golaszewski; +Cc: oe-kbuild-all, linux-kernel, Srinivas Kandagatla

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   28a23309c8e40d651faf4cc3cc9b71458a11b987
commit: 6a7b4134fb7ad56c62dcce032607eda51f2ced24 nvmem: protect nvmem_device::ops with SRCU
date:   9 weeks ago
config: sparc-randconfig-r2300-20261203 (https://download.01.org/0day-ci/archive/20261205/20261205085222.ng09iXZK-lkp@intel.com/config)
compiler: sparc-linux-gcc (GCC) 14.4.0
sparse: v0.6.5-rc1-94-g0d159c10
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261205/20261205085222.ng09iXZK-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
| Fixes: 6a7b4134fb7a ("nvmem: protect nvmem_device::ops with SRCU")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261205085222.ng09iXZK-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/nvmem/core.c:1061:15: sparse: sparse: incorrect type in initializer (different base types) @@     expected void *__tmp @@     got struct nvmem_operations * @@
   drivers/nvmem/core.c:1061:15: sparse:     expected void *__tmp
   drivers/nvmem/core.c:1061:15: sparse:     got struct nvmem_operations *
   drivers/nvmem/core.c:1084:15: sparse: sparse: incorrect type in initializer (different base types) @@     expected void *__tmp @@     got struct nvmem_operations * @@
   drivers/nvmem/core.c:1084:15: sparse:     expected void *__tmp
   drivers/nvmem/core.c:1084:15: sparse:     got struct nvmem_operations *

vim +1061 drivers/nvmem/core.c

  1047	
  1048		blocking_notifier_call_chain(&nvmem_notifier, NVMEM_ADD, nvmem);
  1049	
  1050		return nvmem;
  1051	
  1052	#ifdef CONFIG_NVMEM_SYSFS
  1053	err_destroy_layout:
  1054		nvmem_destroy_layout(nvmem);
  1055	#endif
  1056	err_remove_dev:
  1057		device_del(&nvmem->dev);
  1058	err_remove_compat:
  1059		nvmem_sysfs_remove_compat(nvmem);
  1060	err_put_device:
> 1061		ops = rcu_replace_pointer(nvmem->ops, NULL, true);
  1062		synchronize_srcu(&nvmem->srcu);
  1063		put_device(&nvmem->dev);
  1064		kfree(ops);
  1065	
  1066		return ERR_PTR(rval);
  1067	}
  1068	EXPORT_SYMBOL_GPL(nvmem_register);
  1069	

-- 
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:[~2026-12-06 11:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-06 11:28 drivers/nvmem/core.c:1061:15: sparse: sparse: incorrect type in initializer (different base types) 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

all inboxes | Powered by JetHome®