[efi:urgent 6/7] arch/x86/platform/efi/efi_32.c:53:20: sparse: sparse: incorrect type in assignment (different address spaces)

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git urgent
head:   477ecfc4260135c7a37f18e7648f0b135dcd352a
commit: b6c3e5b587677c0c7cf4b21eb6e89e77a18f4482 [6/7] efi/x86: Move 32-bit code into efi_32.c
config: i386-randconfig-s001-20200817 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-180-g49f7e13a-dirty
        git checkout b6c3e5b587677c0c7cf4b21eb6e89e77a18f4482
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

>> arch/x86/platform/efi/efi_32.c:53:20: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *[assigned] va @@     got void [noderef] __iomem * @@
>> arch/x86/platform/efi/efi_32.c:53:20: sparse:     expected void *[assigned] va
>> arch/x86/platform/efi/efi_32.c:53:20: sparse:     got void [noderef] __iomem *

# https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git/commit/?id=b6c3e5b587677c0c7cf4b21eb6e89e77a18f4482
git remote add efi https://git.kernel.org/pub/scm/linux/kernel/git/efi/efi.git
git fetch --no-tags efi urgent
git checkout b6c3e5b587677c0c7cf4b21eb6e89e77a18f4482
vim +53 arch/x86/platform/efi/efi_32.c

    35	
    36	void __init efi_map_region(efi_memory_desc_t *md)
    37	{
    38		u64 start_pfn, end_pfn, end;
    39		unsigned long size;
    40		void *va;
    41	
    42		start_pfn	= PFN_DOWN(md->phys_addr);
    43		size		= md->num_pages << PAGE_SHIFT;
    44		end		= md->phys_addr + size;
    45		end_pfn 	= PFN_UP(end);
    46	
    47		if (pfn_range_is_mapped(start_pfn, end_pfn)) {
    48			va = __va(md->phys_addr);
    49	
    50			if (!(md->attribute & EFI_MEMORY_WB))
    51				set_memory_uc((unsigned long)va, md->num_pages);
    52		} else {
  > 53			va = efi_ioremap(md->phys_addr, size,
    54					 md->type, md->attribute);
    55		}
    56	
    57		md->virt_addr = (unsigned long)va;
    58		if (!va)
    59			pr_err("ioremap of 0x%llX failed!\n", md->phys_addr);
    60	}
    61	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux