From: kernel test robot <lkp@intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c:96:50: sparse: sparse: cast removes address space '__iomem' of expression
Date: Tue, 15 Feb 2022 03:43:23 +0800 [thread overview]
Message-ID: <202202150359.0tDKN8pA-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 754e0b0e35608ed5206d6a67a791563c631cec07
commit: a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774 thermal: int340x: processor_thermal: Refactor MMIO interface
date: 1 year, 2 months ago
config: x86_64-randconfig-s022-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150359.0tDKN8pA-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/platform/pvh/ drivers/gpio/ drivers/mailbox/ drivers/media/cec/platform/meson/ drivers/media/cec/platform/tegra/ drivers/media/rc/ drivers/pwm/ drivers/regulator/ drivers/spi/ drivers/thermal/intel/int340x_thermal/ drivers/usb/gadget/udc/ kernel/sched/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c:96:50: sparse: sparse: cast removes address space '__iomem' of expression
drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c:100:36: sparse: sparse: cast removes address space '__iomem' of expression
vim +/__iomem +96 drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c
81
82 int proc_thermal_rapl_add(struct pci_dev *pdev, struct proc_thermal_device *proc_priv)
83 {
84 const struct rapl_mmio_regs *rapl_regs = &rapl_mmio_default;
85 enum rapl_domain_reg_id reg;
86 enum rapl_domain_type domain;
87 int ret;
88
89 if (!rapl_regs)
90 return 0;
91
92 for (domain = RAPL_DOMAIN_PACKAGE; domain < RAPL_DOMAIN_MAX; domain++) {
93 for (reg = RAPL_DOMAIN_REG_LIMIT; reg < RAPL_DOMAIN_REG_MAX; reg++)
94 if (rapl_regs->regs[domain][reg])
95 rapl_mmio_priv.regs[domain][reg] =
> 96 (u64)proc_priv->mmio_base +
97 rapl_regs->regs[domain][reg];
98 rapl_mmio_priv.limits[domain] = rapl_regs->limits[domain];
99 }
100 rapl_mmio_priv.reg_unit = (u64)proc_priv->mmio_base + rapl_regs->reg_unit;
101
102 rapl_mmio_priv.read_raw = rapl_mmio_read_raw;
103 rapl_mmio_priv.write_raw = rapl_mmio_write_raw;
104
105 rapl_mmio_priv.control_type = powercap_register_control_type(NULL, "intel-rapl-mmio", NULL);
106 if (IS_ERR(rapl_mmio_priv.control_type)) {
107 pr_debug("failed to register powercap control_type.\n");
108 return PTR_ERR(rapl_mmio_priv.control_type);
109 }
110
111 ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "powercap/rapl:online",
112 rapl_mmio_cpu_online, rapl_mmio_cpu_down_prep);
113 if (ret < 0) {
114 powercap_unregister_control_type(rapl_mmio_priv.control_type);
115 rapl_mmio_priv.control_type = NULL;
116 return ret;
117 }
118 rapl_mmio_priv.pcap_rapl_online = ret;
119
120 return 0;
121 }
122 EXPORT_SYMBOL_GPL(proc_thermal_rapl_add);
123
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2022-02-14 21:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 19:43 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-03 4:53 kernel test robot
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=202202150359.0tDKN8pA-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.pandruvada@linux.intel.com \
/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
all inboxes | Powered by JetHome®