From: kernel test robot <lkp@intel.com>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>
Subject: [linux-next:master 12558/13205] drivers/thermal/intel/int340x_thermal/processor_thermal_rapl.c:96:50: sparse: sparse: cast removes address space '__iomem' of expression
Date: Mon, 14 Dec 2020 04:25:09 +0800 [thread overview]
Message-ID: <202012140408.iAPJuvkJ-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3250 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 3cc2bd440f2171f093b3a8480a4b54d8c270ed38
commit: a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774 [12558/13205] thermal: int340x: processor_thermal: Refactor MMIO interface
config: x86_64-randconfig-s022-20201213 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-184-g1b896707-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774
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 a5923b6c3137b9d4fc2ea1c997f6e4d51ac5d774
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31315 bytes --]
reply other threads:[~2020-12-13 20:26 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=202012140408.iAPJuvkJ-lkp@intel.com \
--to=lkp@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.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