Re: [PATCH] ACPI: APEI: EINJ: EINJV2 support added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Piyush,

kernel test robot noticed the following build warnings:

[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on linus/master v6.4-rc1 next-20230508]
[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/Piyush-Malgujar/ACPI-APEI-EINJ-EINJV2-support-added/20230503-223915
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link:    https://lore.kernel.org/r/20230503143759.10485-1-pmalgujar%40marvell.com
patch subject: [PATCH] ACPI: APEI: EINJ: EINJV2 support added
config: x86_64-randconfig-s022 (https://download.01.org/0day-ci/archive/20230509/202305090445.WSd683gm-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/ca5bbbdcc074577ee88ccaa2d078a37eb5eec36f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Piyush-Malgujar/ACPI-APEI-EINJ-EINJV2-support-added/20230503-223915
        git checkout ca5bbbdcc074577ee88ccaa2d078a37eb5eec36f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 olddefconfig
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/acpi/apei/ drivers/platform/x86/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202305090445.WSd683gm-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
   drivers/acpi/apei/einj.c:247:11: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct vendor_error_type_extension *v @@     got void [noderef] __iomem * @@
   drivers/acpi/apei/einj.c:247:11: sparse:     expected struct vendor_error_type_extension *v
   drivers/acpi/apei/einj.c:247:11: sparse:     got void [noderef] __iomem *
   drivers/acpi/apei/einj.c:255:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __iomem *virt @@     got struct vendor_error_type_extension *v @@
   drivers/acpi/apei/einj.c:255:29: sparse:     expected void [noderef] __iomem *virt
   drivers/acpi/apei/einj.c:255:29: sparse:     got struct vendor_error_type_extension *v
>> drivers/acpi/apei/einj.c:286:26: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct einjv2_set_error_type *v65param @@     got void [noderef] __iomem * @@
   drivers/acpi/apei/einj.c:286:26: sparse:     expected struct einjv2_set_error_type *v65param
   drivers/acpi/apei/einj.c:286:26: sparse:     got void [noderef] __iomem *
   drivers/acpi/apei/einj.c:295:25: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct set_error_type_with_address *v5param @@     got void [noderef] __iomem * @@
   drivers/acpi/apei/einj.c:295:25: sparse:     expected struct set_error_type_with_address *v5param
   drivers/acpi/apei/einj.c:295:25: sparse:     got void [noderef] __iomem *
   drivers/acpi/apei/einj.c:305:25: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct einj_parameter *v4param @@     got void [noderef] __iomem * @@
   drivers/acpi/apei/einj.c:305:25: sparse:     expected struct einj_parameter *v4param
   drivers/acpi/apei/einj.c:305:25: sparse:     got void [noderef] __iomem *
   drivers/acpi/apei/einj.c:309:45: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __iomem *virt @@     got struct einj_parameter *v4param @@
   drivers/acpi/apei/einj.c:309:45: sparse:     expected void [noderef] __iomem *virt
   drivers/acpi/apei/einj.c:309:45: sparse:     got struct einj_parameter *v4param
   drivers/acpi/apei/einj.c:376:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct acpi_einj_trigger *trigger_tab @@     got void [noderef] __iomem * @@
   drivers/acpi/apei/einj.c:376:21: sparse:     expected struct acpi_einj_trigger *trigger_tab
   drivers/acpi/apei/einj.c:376:21: sparse:     got void [noderef] __iomem *
   drivers/acpi/apei/einj.c:402:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got struct acpi_einj_trigger *trigger_tab @@
   drivers/acpi/apei/einj.c:402:17: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/acpi/apei/einj.c:402:17: sparse:     got struct acpi_einj_trigger *trigger_tab
   drivers/acpi/apei/einj.c:403:21: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct acpi_einj_trigger *trigger_tab @@     got void [noderef] __iomem * @@
   drivers/acpi/apei/einj.c:403:21: sparse:     expected struct acpi_einj_trigger *trigger_tab
   drivers/acpi/apei/einj.c:403:21: sparse:     got void [noderef] __iomem *
   drivers/acpi/apei/einj.c:468:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got struct acpi_einj_trigger *trigger_tab @@
   drivers/acpi/apei/einj.c:468:25: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/acpi/apei/einj.c:468:25: sparse:     got struct acpi_einj_trigger *trigger_tab
   drivers/acpi/apei/einj.c:930:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __iomem *virt @@     got void *static [assigned] [toplevel] einj_param @@
   drivers/acpi/apei/einj.c:930:37: sparse:     expected void [noderef] __iomem *virt
   drivers/acpi/apei/einj.c:930:37: sparse:     got void *static [assigned] [toplevel] einj_param

vim +286 drivers/acpi/apei/einj.c

   237	
   238	static void check_vendor_extension(u64 paddr,
   239					   struct set_error_type_with_address *v5param)
   240	{
   241		int	offset = v5param->vendor_extension;
   242		struct	vendor_error_type_extension *v;
   243		u32	sbdf;
   244	
   245		if (!offset)
   246			return;
 > 247		v = acpi_os_map_iomem(paddr + offset, sizeof(*v));
   248		if (!v)
   249			return;
   250		sbdf = v->pcie_sbdf;
   251		sprintf(vendor_dev, "%x:%x:%x.%x vendor_id=%x device_id=%x rev_id=%x\n",
   252			sbdf >> 24, (sbdf >> 16) & 0xff,
   253			(sbdf >> 11) & 0x1f, (sbdf >> 8) & 0x7,
   254			 v->vendor_id, v->device_id, v->rev_id);
   255		acpi_os_unmap_iomem(v, sizeof(*v));
   256	}
   257	
   258	static void *einj_get_parameter_address(void)
   259	{
   260		int i;
   261		u64 pa_v4 = 0, pa_v5 = 0, pa_v65 = 0;
   262		struct acpi_whea_header *entry;
   263	
   264		entry = EINJ_TAB_ENTRY(einj_tab);
   265		for (i = 0; i < einj_tab->entries; i++) {
   266			if (entry->action == ACPI_EINJ_SET_ERROR_TYPE &&
   267			    entry->instruction == ACPI_EINJ_WRITE_REGISTER &&
   268			    entry->register_region.space_id ==
   269			    ACPI_ADR_SPACE_SYSTEM_MEMORY)
   270				pa_v4 = get_unaligned(&entry->register_region.address);
   271			if (entry->action == ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS &&
   272			    entry->instruction == ACPI_EINJ_WRITE_REGISTER &&
   273			    entry->register_region.space_id ==
   274			    ACPI_ADR_SPACE_SYSTEM_MEMORY)
   275				pa_v5 = get_unaligned(&entry->register_region.address);
   276			if (entry->action == ACPI_EINJV2_SET_ERROR_TYPE &&
   277			    entry->instruction == ACPI_EINJ_WRITE_REGISTER &&
   278			    entry->register_region.space_id ==
   279			    ACPI_ADR_SPACE_SYSTEM_MEMORY)
   280				pa_v65 = get_unaligned(&entry->register_region.address);
   281			entry++;
   282		}
   283		if (pa_v65) {
   284			struct einjv2_set_error_type *v65param;
   285	
 > 286			v65param = acpi_os_map_iomem(pa_v65, sizeof(*v65param));
   287			if (v65param) {
   288				einjv2_supp = 1;
   289				return v65param;
   290			}
   291		}
   292		if (pa_v5) {
   293			struct set_error_type_with_address *v5param;
   294	
   295			v5param = acpi_os_map_iomem(pa_v5, sizeof(*v5param));
   296			if (v5param) {
   297				acpi5 = 1;
   298				check_vendor_extension(pa_v5, v5param);
   299				return v5param;
   300			}
   301		}
   302		if (param_extension && pa_v4) {
   303			struct einj_parameter *v4param;
   304	
   305			v4param = acpi_os_map_iomem(pa_v4, sizeof(*v4param));
   306			if (!v4param)
   307				return NULL;
   308			if (v4param->reserved1 || v4param->reserved2) {
   309				acpi_os_unmap_iomem(v4param, sizeof(*v4param));
   310				return NULL;
   311			}
   312			return v4param;
   313		}
   314	
   315		return NULL;
   316	}
   317	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux