lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202311021837.jbynFQZT-lkp@intel.com>
Date:   Thu, 2 Nov 2023 18:13:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     Daniel Lezcano <daniel.lezcano@...exp.org>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: drivers/thermal/broadcom/ns-thermal.c:56:44: sparse: sparse:
 incorrect type in argument 3 (different address spaces)

Hi Daniel,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   21e80f3841c01aeaf32d7aee7bbc87b3db1aa0c6
commit: f59ac19b7f44cab23df84810e2da5f57bdd3a7e7 thermal/of: Remove old OF code
date:   1 year, 3 months ago
config: openrisc-randconfig-r131-20231102 (https://download.01.org/0day-ci/archive/20231102/202311021837.jbynFQZT-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231102/202311021837.jbynFQZT-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311021837.jbynFQZT-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/thermal/broadcom/ns-thermal.c:19:34: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void [noderef] __iomem *pvtmon @@     got void *devdata @@
   drivers/thermal/broadcom/ns-thermal.c:19:34: sparse:     expected void [noderef] __iomem *pvtmon
   drivers/thermal/broadcom/ns-thermal.c:19:34: sparse:     got void *devdata
>> drivers/thermal/broadcom/ns-thermal.c:56:44: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected void *data @@     got void [noderef] __iomem *[assigned] pvtmon @@
   drivers/thermal/broadcom/ns-thermal.c:56:44: sparse:     expected void *data
   drivers/thermal/broadcom/ns-thermal.c:56:44: sparse:     got void [noderef] __iomem *[assigned] pvtmon
   drivers/thermal/broadcom/ns-thermal.c:63:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void *data @@     got void [noderef] __iomem *[assigned] pvtmon @@
   drivers/thermal/broadcom/ns-thermal.c:63:36: sparse:     expected void *data
   drivers/thermal/broadcom/ns-thermal.c:63:36: sparse:     got void [noderef] __iomem *[assigned] pvtmon
>> drivers/thermal/broadcom/ns-thermal.c:70:52: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void [noderef] __iomem *pvtmon @@     got void * @@
   drivers/thermal/broadcom/ns-thermal.c:70:52: sparse:     expected void [noderef] __iomem *pvtmon
   drivers/thermal/broadcom/ns-thermal.c:70:52: sparse:     got void *

vim +56 drivers/thermal/broadcom/ns-thermal.c

a94cb7eeecc410 Rafał Miłecki  2017-04-03  44  
a94cb7eeecc410 Rafał Miłecki  2017-04-03  45  static int ns_thermal_probe(struct platform_device *pdev)
a94cb7eeecc410 Rafał Miłecki  2017-04-03  46  {
a94cb7eeecc410 Rafał Miłecki  2017-04-03  47  	struct device *dev = &pdev->dev;
944441d878b0ae Daniel Lezcano 2022-08-05  48  	struct thermal_zone_device *tz;
944441d878b0ae Daniel Lezcano 2022-08-05  49  	void __iomem *pvtmon;
a94cb7eeecc410 Rafał Miłecki  2017-04-03  50  
944441d878b0ae Daniel Lezcano 2022-08-05  51  	pvtmon = of_iomap(dev_of_node(dev), 0);
944441d878b0ae Daniel Lezcano 2022-08-05  52  	if (WARN_ON(!pvtmon))
a94cb7eeecc410 Rafał Miłecki  2017-04-03  53  		return -ENOENT;
a94cb7eeecc410 Rafał Miłecki  2017-04-03  54  
944441d878b0ae Daniel Lezcano 2022-08-05  55  	tz = devm_thermal_of_zone_register(dev, 0,
944441d878b0ae Daniel Lezcano 2022-08-05 @56  					   pvtmon,
a94cb7eeecc410 Rafał Miłecki  2017-04-03  57  					   &ns_thermal_ops);
944441d878b0ae Daniel Lezcano 2022-08-05  58  	if (IS_ERR(tz)) {
944441d878b0ae Daniel Lezcano 2022-08-05  59  		iounmap(pvtmon);
944441d878b0ae Daniel Lezcano 2022-08-05  60  		return PTR_ERR(tz);
a94cb7eeecc410 Rafał Miłecki  2017-04-03  61  	}
a94cb7eeecc410 Rafał Miłecki  2017-04-03  62  
944441d878b0ae Daniel Lezcano 2022-08-05  63  	platform_set_drvdata(pdev, pvtmon);
a94cb7eeecc410 Rafał Miłecki  2017-04-03  64  
a94cb7eeecc410 Rafał Miłecki  2017-04-03  65  	return 0;
a94cb7eeecc410 Rafał Miłecki  2017-04-03  66  }
a94cb7eeecc410 Rafał Miłecki  2017-04-03  67  
a94cb7eeecc410 Rafał Miłecki  2017-04-03  68  static int ns_thermal_remove(struct platform_device *pdev)
a94cb7eeecc410 Rafał Miłecki  2017-04-03  69  {
944441d878b0ae Daniel Lezcano 2022-08-05 @70  	void __iomem *pvtmon = platform_get_drvdata(pdev);
a94cb7eeecc410 Rafał Miłecki  2017-04-03  71  
944441d878b0ae Daniel Lezcano 2022-08-05  72  	iounmap(pvtmon);
a94cb7eeecc410 Rafał Miłecki  2017-04-03  73  
a94cb7eeecc410 Rafał Miłecki  2017-04-03  74  	return 0;
a94cb7eeecc410 Rafał Miłecki  2017-04-03  75  }
a94cb7eeecc410 Rafał Miłecki  2017-04-03  76  

:::::: The code at line 56 was first introduced by commit
:::::: 944441d878b0aebd87ec404fe86c322186da458d thermal/drivers/broadcom: Switch to new of API

:::::: TO: Daniel Lezcano <daniel.lezcano@...exp.org>
:::::: CC: Daniel Lezcano <daniel.lezcano@...aro.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ