drivers/mfd/ls2k-bmc-core.c:108:14: sparse: sparse: incorrect type in assignment (different address spaces)
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 26260251022fbc2f248a3d747a9b2b961b18d2d8 commit: 0d64f6d1ffe96f59145481f7413344b1fa3ad1ce mfd: ls2kbmc: Introduce Loongson-2K BMC core driver date: 11 months ago config: loongarch-randconfig-r122-20260822 (https://download.01.org/0day-ci/archive/20260823/[email protected]/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/20260823/[email protected]/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: 0d64f6d1ffe9 ("mfd: ls2kbmc: Introduce Loongson-2K BMC core driver") | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ sparse warnings: (new ones prefixed by >>) >> drivers/mfd/ls2k-bmc-core.c:108:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char *mode @@ got void [noderef] __iomem * @@ drivers/mfd/ls2k-bmc-core.c:108:14: sparse: expected char *mode drivers/mfd/ls2k-bmc-core.c:108:14: sparse: got void [noderef] __iomem * vim +108 drivers/mfd/ls2k-bmc-core.c 97 98 /* 99 * Currently the Loongson-2K BMC hardware does not have an I2C interface to adapt to the 100 * resolution. We set the resolution by presetting "video=1280x1024-16@2M" to the BMC memory. 101 */ 102 static int ls2k_bmc_parse_mode(struct pci_dev *pdev, struct simplefb_platform_data *pd) 103 { 104 char *mode; 105 int depth, ret; 106 107 /* The last 16M of PCI BAR0 is used to store the resolution string. */ > 108 mode = devm_ioremap(&pdev->dev, pci_resource_start(pdev, 0) + SZ_16M, SZ_16M); 109 if (!mode) 110 return -ENOMEM; 111 112 /* The resolution field starts with the flag "video=". */ 113 if (!strncmp(mode, "video=", 6)) 114 mode = mode + 6; 115 116 ret = kstrtoint(strsep(&mode, "x"), 10, &pd->width); 117 if (ret) 118 return ret; 119 120 ret = kstrtoint(strsep(&mode, "-"), 10, &pd->height); 121 if (ret) 122 return ret; 123 124 ret = kstrtoint(strsep(&mode, "@"), 10, &depth); 125 if (ret) 126 return ret; 127 128 pd->stride = pd->width * depth / 8; 129 pd->format = depth == 32 ? "a8r8g8b8" : "r5g6b5"; 130 131 return 0; 132 } 133 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki