[PATCH 09/18] power: reset: rmobile-reset: Use devm_register_sys_off_handler(RESTART)
kernel test robot
lkp at intel.com
Fri Feb 2 20:20:06 PST 2024
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-10-afd%40ti.com
patch subject: [PATCH 09/18] power: reset: rmobile-reset: Use devm_register_sys_off_handler(RESTART)
config: hexagon-randconfig-r122-20240202 (https://download.01.org/0day-ci/archive/20240203/202402031246.nZHDnDnf-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 7dd790db8b77c4a833c06632e903dc4f13877a64)
reproduce: (https://download.01.org/0day-ci/archive/20240203/202402031246.nZHDnDnf-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/202402031246.nZHDnDnf-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/power/reset/rmobile-reset.c:24:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void [noderef] __iomem *sysc_base2 @@ got void *cb_data @@
drivers/power/reset/rmobile-reset.c:24:40: sparse: expected void [noderef] __iomem *sysc_base2
drivers/power/reset/rmobile-reset.c:24:40: sparse: got void *cb_data
>> drivers/power/reset/rmobile-reset.c:45:47: sparse: sparse: incorrect type in argument 5 (different address spaces) @@ expected void *cb_data @@ got void [noderef] __iomem *[assigned] sysc_base2 @@
drivers/power/reset/rmobile-reset.c:45:47: sparse: expected void *cb_data
drivers/power/reset/rmobile-reset.c:45:47: sparse: got void [noderef] __iomem *[assigned] sysc_base2
vim +24 drivers/power/reset/rmobile-reset.c
21
22 static int rmobile_reset_handler(struct sys_off_data *data)
23 {
> 24 void __iomem *sysc_base2 = data->cb_data;
25
26 /* Let's assume we have acquired the HPB semaphore */
27 writel(RESCNT2_PRES, sysc_base2 + RESCNT2);
28
29 return NOTIFY_DONE;
30 }
31
32 static int rmobile_reset_probe(struct platform_device *pdev)
33 {
34 void __iomem *sysc_base2;
35 int error;
36
37 sysc_base2 = devm_platform_ioremap_resource(pdev, 0);
38 if (IS_ERR(sysc_base2))
39 return PTR_ERR(sysc_base2);
40
41 error = devm_register_sys_off_handler(&pdev->dev,
42 SYS_OFF_MODE_RESTART,
43 SYS_OFF_PRIO_HIGH,
44 rmobile_reset_handler,
> 45 sysc_base2);
46 if (error) {
47 dev_err(&pdev->dev,
48 "cannot register restart handler (err=%d)\n", error);
49 return error;
50 }
51
52 return 0;
53 }
54
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the Linux-mediatek
mailing list