From: kernel test robot <lkp@intel.com>
To: Daniel Lezcano <daniel.lezcano@linexp.org>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 1269/4736] drivers/thermal/broadcom/ns-thermal.c:19:34: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Tue, 6 Sep 2022 02:14:16 +0800 [thread overview]
Message-ID: <202209060229.dVuyxjBv-lkp@intel.com> (raw)
Hi Daniel,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: e47eb90a0a9ae20b82635b9b99a8d0979b757ad8
commit: f59ac19b7f44cab23df84810e2da5f57bdd3a7e7 [1269/4736] thermal/of: Remove old OF code
config: ia64-randconfig-s043-20220905 (https://download.01.org/0day-ci/archive/20220906/202209060229.dVuyxjBv-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f59ac19b7f44cab23df84810e2da5f57bdd3a7e7
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f59ac19b7f44cab23df84810e2da5f57bdd3a7e7
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=ia64 SHELL=/bin/bash arch/ia64/kernel/ drivers/thermal/broadcom/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <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 +19 drivers/thermal/broadcom/ns-thermal.c
a94cb7eeecc410 Rafał Miłecki 2017-04-03 16
944441d878b0ae Daniel Lezcano 2022-08-05 17 static int ns_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
a94cb7eeecc410 Rafał Miłecki 2017-04-03 18 {
944441d878b0ae Daniel Lezcano 2022-08-05 @19 void __iomem *pvtmon = tz->devdata;
944441d878b0ae Daniel Lezcano 2022-08-05 20 int offset = thermal_zone_get_offset(tz);
944441d878b0ae Daniel Lezcano 2022-08-05 21 int slope = thermal_zone_get_slope(tz);
a94cb7eeecc410 Rafał Miłecki 2017-04-03 22 u32 val;
a94cb7eeecc410 Rafał Miłecki 2017-04-03 23
944441d878b0ae Daniel Lezcano 2022-08-05 24 val = readl(pvtmon + PVTMON_CONTROL0);
a94cb7eeecc410 Rafał Miłecki 2017-04-03 25 if ((val & PVTMON_CONTROL0_SEL_MASK) != PVTMON_CONTROL0_SEL_TEMP_MONITOR) {
a94cb7eeecc410 Rafał Miłecki 2017-04-03 26 /* Clear current mode selection */
a94cb7eeecc410 Rafał Miłecki 2017-04-03 27 val &= ~PVTMON_CONTROL0_SEL_MASK;
a94cb7eeecc410 Rafał Miłecki 2017-04-03 28
a94cb7eeecc410 Rafał Miłecki 2017-04-03 29 /* Set temp monitor mode (it's the default actually) */
a94cb7eeecc410 Rafał Miłecki 2017-04-03 30 val |= PVTMON_CONTROL0_SEL_TEMP_MONITOR;
a94cb7eeecc410 Rafał Miłecki 2017-04-03 31
944441d878b0ae Daniel Lezcano 2022-08-05 32 writel(val, pvtmon + PVTMON_CONTROL0);
a94cb7eeecc410 Rafał Miłecki 2017-04-03 33 }
a94cb7eeecc410 Rafał Miłecki 2017-04-03 34
944441d878b0ae Daniel Lezcano 2022-08-05 35 val = readl(pvtmon + PVTMON_STATUS);
a94cb7eeecc410 Rafał Miłecki 2017-04-03 36 *temp = slope * val + offset;
a94cb7eeecc410 Rafał Miłecki 2017-04-03 37
a94cb7eeecc410 Rafał Miłecki 2017-04-03 38 return 0;
a94cb7eeecc410 Rafał Miłecki 2017-04-03 39 }
a94cb7eeecc410 Rafał Miłecki 2017-04-03 40
944441d878b0ae Daniel Lezcano 2022-08-05 41 static const struct thermal_zone_device_ops ns_thermal_ops = {
a94cb7eeecc410 Rafał Miłecki 2017-04-03 42 .get_temp = ns_thermal_get_temp,
a94cb7eeecc410 Rafał Miłecki 2017-04-03 43 };
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 19 was first introduced by commit
:::::: 944441d878b0aebd87ec404fe86c322186da458d thermal/drivers/broadcom: Switch to new of API
:::::: TO: Daniel Lezcano <daniel.lezcano@linexp.org>
:::::: CC: Daniel Lezcano <daniel.lezcano@linaro.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
reply other threads:[~2022-09-05 18:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202209060229.dVuyxjBv-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel.lezcano@linexp.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).