[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202012270946.Ud9ou842-lkp@intel.com>
Date: Sun, 27 Dec 2020 09:24:50 +0800
From: kernel test robot <lkp@...el.com>
To: Dan Carpenter <error27@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: sparse: incorrect
type in argument 1 (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f838f8d2b694cf9d524dc4423e9dd2db13892f3f
commit: cf25d802e029c31efac8bdc979236927f37183bd soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains()
date: 9 weeks ago
config: openrisc-randconfig-s032-20201221 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf25d802e029c31efac8bdc979236927f37183bd
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout cf25d802e029c31efac8bdc979236927f37183bd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=openrisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *addr @@ got void [noderef] __iomem *[assigned] base @@
drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: expected void *addr
drivers/soc/renesas/rmobile-sysc.c:330:33: sparse: got void [noderef] __iomem *[assigned] base
vim +330 drivers/soc/renesas/rmobile-sysc.c
313
314 static int __init rmobile_init_pm_domains(void)
315 {
316 struct device_node *np, *pmd;
317 bool scanned = false;
318 void __iomem *base;
319 int ret = 0;
320
321 for_each_compatible_node(np, NULL, "renesas,sysc-rmobile") {
322 base = of_iomap(np, 0);
323 if (!base) {
324 pr_warn("%pOF cannot map reg 0\n", np);
325 continue;
326 }
327
328 pmd = of_get_child_by_name(np, "pm-domains");
329 if (!pmd) {
> 330 iounmap(base);
331 pr_warn("%pOF lacks pm-domains node\n", np);
332 continue;
333 }
334
335 if (!scanned) {
336 /* Find PM domains containing special blocks */
337 get_special_pds();
338 scanned = true;
339 }
340
341 ret = rmobile_add_pm_domains(base, pmd, NULL);
342 of_node_put(pmd);
343 if (ret) {
344 of_node_put(np);
345 break;
346 }
347 }
348
349 put_special_pds();
350
351 return ret;
352 }
353
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (28930 bytes)
Powered by blists - more mailing lists