[PATCH 1/8] firmware: arm_scmi: Introduce setup_shmem_iomap

kernel test robot lkp at intel.com
Sun Jul 7 19:19:35 PDT 2024


Hi Cristian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on soc/for-next]
[also build test WARNING on next-20240703]
[cannot apply to linus/master v6.10-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Cristian-Marussi/firmware-arm_scmi-Introduce-setup_shmem_iomap/20240707-082513
base:   https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
patch link:    https://lore.kernel.org/r/20240707002055.1835121-2-cristian.marussi%40arm.com
patch subject: [PATCH 1/8] firmware: arm_scmi: Introduce setup_shmem_iomap
config: arm-randconfig-r111-20240708 (https://download.01.org/0day-ci/archive/20240708/202407080937.AYEaDXCD-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project a0c6b8aef853eedaa0980f07c0a502a5a8a9740e)
reproduce: (https://download.01.org/0day-ci/archive/20240708/202407080937.AYEaDXCD-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202407080937.AYEaDXCD-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/firmware/arm_scmi/shmem.c:170:16: sparse: sparse: incorrect type in return expression (different address spaces) @@     expected void * @@     got void [noderef] __iomem *[assigned] addr @@
   drivers/firmware/arm_scmi/shmem.c:170:16: sparse:     expected void *
   drivers/firmware/arm_scmi/shmem.c:170:16: sparse:     got void [noderef] __iomem *[assigned] addr
   drivers/firmware/arm_scmi/shmem.c:139:6: sparse: sparse: symbol 'setup_shmem_iomap' redeclared with different type (different address spaces):
   drivers/firmware/arm_scmi/shmem.c:139:6: sparse:    void *extern [addressable] [noderef] [toplevel] __iomem setup_shmem_iomap( ... )
   drivers/firmware/arm_scmi/shmem.c: note: in included file:
   drivers/firmware/arm_scmi/common.h:330:14: sparse: note: previously declared as:
   drivers/firmware/arm_scmi/common.h:330:14: sparse:    void [noderef] __iomem *extern [addressable] [toplevel] setup_shmem_iomap( ... )

vim +170 drivers/firmware/arm_scmi/shmem.c

   138	
   139	void *__iomem
   140	setup_shmem_iomap(struct scmi_chan_info *cinfo, struct device *dev, bool tx)
   141	{
   142		const char *desc = tx ? "Tx" : "Rx";
   143		int ret, idx = tx ? 0 : 1;
   144		struct device *cdev = cinfo->dev;
   145		struct device_node *shmem;
   146		resource_size_t size;
   147		struct resource res;
   148		void __iomem *addr;
   149	
   150		shmem = of_parse_phandle(cdev->of_node, "shmem", idx);
   151		if (!of_device_is_compatible(shmem, "arm,scmi-shmem")) {
   152			of_node_put(shmem);
   153			return ERR_PTR(-ENXIO);
   154		}
   155	
   156		ret = of_address_to_resource(shmem, 0, &res);
   157		of_node_put(shmem);
   158		if (ret) {
   159			dev_err(cdev, "failed to get SCMI %s shared memory\n", desc);
   160			return ERR_PTR(ret);
   161		}
   162	
   163		size = resource_size(&res);
   164		addr = devm_ioremap(dev, res.start, size);
   165		if (!addr) {
   166			dev_err(dev, "failed to ioremap SCMI %s shared memory\n", desc);
   167			return ERR_PTR(-EADDRNOTAVAIL);
   168		}
   169	
 > 170		return addr;

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



More information about the linux-arm-kernel mailing list