[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202503081600.JxR875hh-lkp@intel.com>
Date: Sat, 8 Mar 2025 16:55:04 +0800
From: kernel test robot <lkp@...el.com>
To: Zaid Alali <zaidal@...amperecomputing.com>, rafael@...nel.org,
lenb@...nel.org, james.morse@....com, tony.luck@...el.com,
bp@...en8.de, robert.moore@...el.com, dan.j.williams@...el.com,
Jonathan.Cameron@...wei.com, Benjamin.Cheatham@....com,
Avadhut.Naik@....com, viro@...iv.linux.org.uk, arnd@...db.de,
ira.weiny@...el.com, dave.jiang@...el.com,
sthanneeru.opensrc@...ron.com, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, acpica-devel@...ts.linux.dev
Cc: oe-kbuild-all@...ts.linux.dev
Subject: Re: [PATCH v4 3/9] ACPI: APEI: EINJ: Fix kernel test robot sparse
warning
Hi Zaid,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge linus/master v6.14-rc5 next-20250307]
[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/Zaid-Alali/ACPICA-Update-values-to-hex-to-follow-ACPI-specs/20250307-075155
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20250306234810.75511-4-zaidal%40os.amperecomputing.com
patch subject: [PATCH v4 3/9] ACPI: APEI: EINJ: Fix kernel test robot sparse warning
config: i386-randconfig-063-20250308 (https://download.01.org/0day-ci/archive/20250308/202503081600.JxR875hh-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250308/202503081600.JxR875hh-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/202503081600.JxR875hh-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/acpi/apei/einj-core.c:265:32: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem *[assigned] p @@
drivers/acpi/apei/einj-core.c:265:32: sparse: expected void *
drivers/acpi/apei/einj-core.c:265:32: sparse: got void [noderef] __iomem *[assigned] p
drivers/acpi/apei/einj-core.c:280:24: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem *[assigned] p @@
drivers/acpi/apei/einj-core.c:280:24: sparse: expected void *
drivers/acpi/apei/einj-core.c:280:24: sparse: got void [noderef] __iomem *[assigned] p
>> drivers/acpi/apei/einj-core.c:824:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *static [toplevel] einj_param @@ got void * @@
drivers/acpi/apei/einj-core.c:824:20: sparse: expected void [noderef] __iomem *static [toplevel] einj_param
drivers/acpi/apei/einj-core.c:824:20: sparse: got void *
vim +265 drivers/acpi/apei/einj-core.c
235
236 static void *einj_get_parameter_address(void)
237 {
238 int i;
239 u64 pa_v4 = 0, pa_v5 = 0;
240 struct acpi_whea_header *entry;
241
242 entry = EINJ_TAB_ENTRY(einj_tab);
243 for (i = 0; i < einj_tab->entries; i++) {
244 if (entry->action == ACPI_EINJ_SET_ERROR_TYPE &&
245 entry->instruction == ACPI_EINJ_WRITE_REGISTER &&
246 entry->register_region.space_id ==
247 ACPI_ADR_SPACE_SYSTEM_MEMORY)
248 pa_v4 = get_unaligned(&entry->register_region.address);
249 if (entry->action == ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS &&
250 entry->instruction == ACPI_EINJ_WRITE_REGISTER &&
251 entry->register_region.space_id ==
252 ACPI_ADR_SPACE_SYSTEM_MEMORY)
253 pa_v5 = get_unaligned(&entry->register_region.address);
254 entry++;
255 }
256 if (pa_v5) {
257 struct set_error_type_with_address v5param;
258 void __iomem *p;
259
260 p = acpi_os_map_iomem(pa_v5, sizeof(v5param));
261 if (p) {
262 memcpy_fromio(&v5param, p, sizeof(v5param));
263 acpi5 = 1;
264 check_vendor_extension(pa_v5, &v5param);
> 265 return p;
266 }
267 }
268 if (param_extension && pa_v4) {
269 struct einj_parameter v4param;
270 void __iomem *p;
271
272 p = acpi_os_map_iomem(pa_v4, sizeof(v4param));
273 if (!p)
274 return NULL;
275 memcpy_fromio(&v4param, p, sizeof(v4param));
276 if (v4param.reserved1 || v4param.reserved2) {
277 acpi_os_unmap_iomem(p, sizeof(v4param));
278 return NULL;
279 }
280 return p;
281 }
282
283 return NULL;
284 }
285
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists