public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Zaid Alali <zaidal@os.amperecomputing.com>,
	rafael@kernel.org, lenb@kernel.org, james.morse@arm.com,
	tony.luck@intel.com, bp@alien8.de, robert.moore@intel.com,
	dan.j.williams@intel.com, Jonathan.Cameron@huawei.com,
	Benjamin.Cheatham@amd.com, Avadhut.Naik@amd.com,
	viro@zeniv.linux.org.uk, arnd@arndb.de, ira.weiny@intel.com,
	dave.jiang@intel.com, sthanneeru.opensrc@micron.com,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	acpica-devel@lists.linux.dev
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v4 3/9] ACPI: APEI: EINJ: Fix kernel test robot sparse warning
Date: Sat, 8 Mar 2025 16:55:04 +0800	[thread overview]
Message-ID: <202503081600.JxR875hh-lkp@intel.com> (raw)
In-Reply-To: <20250306234810.75511-4-zaidal@os.amperecomputing.com>

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@intel.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

  reply	other threads:[~2025-03-08  8:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 23:48 [PATCH v4 0/9] Enable EINJv2 Support Zaid Alali
2025-03-06 23:48 ` [PATCH v4 1/9] ACPICA: Update values to hex to follow ACPI specs Zaid Alali
2025-03-06 23:48 ` [PATCH v4 2/9] ACPICA: Add EINJv2 get error type action Zaid Alali
2025-03-06 23:48 ` [PATCH v4 3/9] ACPI: APEI: EINJ: Fix kernel test robot sparse warning Zaid Alali
2025-03-08  8:55   ` kernel test robot [this message]
2025-03-13  9:37   ` Jonathan Cameron
2025-03-13  9:50   ` Jonathan Cameron
2025-03-06 23:48 ` [PATCH v4 4/9] ACPI: APEI: EINJ: Remove redundant calls to einj_get_available_error_type Zaid Alali
2025-03-06 23:48 ` [PATCH v4 5/9] ACPI: APEI: EINJ: Enable the discovery of EINJv2 capabilities Zaid Alali
2025-03-13  9:39   ` Jonathan Cameron
2025-03-06 23:48 ` [PATCH v4 6/9] ACPI: APEI: EINJ: Add einjv2 extension struct Zaid Alali
2025-03-13  9:42   ` Jonathan Cameron
2025-03-13 20:06     ` Zaid Alali
2025-03-14  9:27       ` Jonathan Cameron
2025-03-06 23:48 ` [PATCH v4 7/9] ACPI: APEI: EINJ: Add debugfs files for EINJv2 support Zaid Alali
2025-03-13  9:46   ` Jonathan Cameron
2025-03-06 23:48 ` [PATCH v4 8/9] ACPI: APEI: EINJ: Enable EINJv2 error injections Zaid Alali
2025-03-13  9:56   ` Jonathan Cameron
2025-03-06 23:48 ` [PATCH v4 9/9] ACPI: APEI: EINJ: Update the documentation for EINJv2 support Zaid Alali
2025-03-13  9:59   ` Jonathan Cameron

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=202503081600.JxR875hh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Avadhut.Naik@amd.com \
    --cc=Benjamin.Cheatham@amd.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=acpica-devel@lists.linux.dev \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=james.morse@arm.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --cc=sthanneeru.opensrc@micron.com \
    --cc=tony.luck@intel.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zaidal@os.amperecomputing.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