Re: [PATCH 06/18] power: reset: brcm-kona-reset: Use devm_register_sys_off_handler(RESTART)

kernel test robot
2024-02-02T15:42:46Z

Hi Andrew,

kernel test robot noticed the following build warnings:

[auto build test WARNING on sre-power-supply/for-next]
[also build test WARNING on mani-mhi/mhi-next soc/for-next linus/master v6.8-rc2 next-20240202]
[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/Andrew-Davis/power-reset-atc260x-poweroff-Use-devm_register_sys_off_handler-RESTART/20240202-020809
base: https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git for-next
patch link: https://lore.kernel.org/r/20240201180102.70395-7-afd%40ti.com
patch subject: [PATCH 06/18] power: reset: brcm-kona-reset: Use devm_register_sys_off_handler(RESTART)
config: arm-randconfig-r121-20240202 (https://download.01.org/0day-ci/archive/20240202/202402022349.daHRuWLB-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240202/202402022349.daHRuWLB-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402022349.daHRuWLB-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/power/reset/brcm-kona-reset.c:18:45: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *kona_reset_base @@ got void *cb_data @@
drivers/power/reset/brcm-kona-reset.c:18:45: sparse: expected void [noderef] __iomem *kona_reset_base
drivers/power/reset/brcm-kona-reset.c:18:45: sparse: got void *cb_data
>> drivers/power/reset/brcm-kona-reset.c:43:46: sparse: sparse: incorrect type in argument 5 (different address spaces) @@ expected void *cb_data @@ got void [noderef] __iomem *[assigned] kona_reset_base @@
drivers/power/reset/brcm-kona-reset.c:43:46: sparse: expected void *cb_data
drivers/power/reset/brcm-kona-reset.c:43:46: sparse: got void [noderef] __iomem *[assigned] kona_reset_base

vim +18 drivers/power/reset/brcm-kona-reset.c

15
16 static int kona_reset_handler(struct sys_off_data *data)
17 {
> 18 void __iomem *kona_reset_base = data->cb_data;
19
20 /*
21 * A soft reset is triggered by writing a 0 to bit 0 of the soft reset
22 * register. To write to that register we must first write the password
23 * and the enable bit in the write access enable register.
24 */
25 writel((RSTMGR_WR_PASSWORD << RSTMGR_WR_PASSWORD_SHIFT) |
26 RSTMGR_WR_ACCESS_ENABLE,
27 kona_reset_base + RSTMGR_REG_WR_ACCESS_OFFSET);
28 writel(0, kona_reset_base + RSTMGR_REG_CHIP_SOFT_RST_OFFSET);
29
30 return NOTIFY_DONE;
31 }
32
33 static int kona_reset_probe(struct platform_device *pdev)
34 {
35 void __iomem *kona_reset_base;
36
37 kona_reset_base = devm_platform_ioremap_resource(pdev, 0);
38 if (IS_ERR(kona_reset_base))
39 return PTR_ERR(kona_reset_base);
40
41 return devm_register_sys_off_handler(&pdev->dev, SYS_OFF_MODE_RESTART,
42 128, kona_reset_handler,
> 43 kona_reset_base);
44 }
45

--
0-DAY CI Kernel Test Service