[efi:next 4/4] arch/x86//platform/efi/efi.c:598:11: warning: 'return' with a value, in function returning void

[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 next
head:   7a771207bf8bc02fc34ea1a86b7547408753fee8
commit: 7a771207bf8bc02fc34ea1a86b7547408753fee8 [4/4] efi: move handling of properties table to x86 specific code
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
        git checkout 7a771207bf8bc02fc34ea1a86b7547408753fee8
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   arch/x86//platform/efi/efi.c: In function 'efi_init':
>> arch/x86//platform/efi/efi.c:598:11: warning: 'return' with a value, in function returning void
       return -ENOMEM;
              ^
   arch/x86//platform/efi/efi.c:542:13: note: declared here
    void __init efi_init(void)
                ^~~~~~~~

vim +/return +598 arch/x86//platform/efi/efi.c

   561	
   562		if (efi_systab_init(efi_phys.systab))
   563			return;
   564	
   565		efi.config_table = (unsigned long)efi.systab->tables;
   566		efi.fw_vendor	 = (unsigned long)efi.systab->fw_vendor;
   567		efi.runtime	 = (unsigned long)efi.systab->runtime;
   568	
   569		/*
   570		 * Show what we know for posterity
   571		 */
   572		c16 = tmp = early_memremap(efi.systab->fw_vendor, 2);
   573		if (c16) {
   574			for (i = 0; i < sizeof(vendor) - 1 && *c16; ++i)
   575				vendor[i] = *c16++;
   576			vendor[i] = '\0';
   577		} else
   578			pr_err("Could not map the firmware vendor!\n");
   579		early_memunmap(tmp, 2);
   580	
   581		pr_info("EFI v%u.%.02u by %s\n",
   582			efi.systab->hdr.revision >> 16,
   583			efi.systab->hdr.revision & 0xffff, vendor);
   584	
   585		if (efi_reuse_config(efi.systab->tables, efi.systab->nr_tables))
   586			return;
   587	
   588		if (efi_config_init(arch_tables))
   589			return;
   590	
   591		/* Parse the EFI Properties table if it exists */
   592		if (properties_table != EFI_INVALID_TABLE_ADDR) {
   593			efi_properties_table_t *tbl;
   594	
   595			tbl = early_memremap(properties_table, sizeof(*tbl));
   596			if (tbl == NULL) {
   597				pr_err("Could not map Properties table!\n");
 > 598				return -ENOMEM;
   599			}
   600	
   601			if (tbl->memory_protection_attribute &
   602			    EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA)
   603				set_bit(EFI_NX_PE_DATA, &efi.flags);
   604	
   605			early_memunmap(tbl, sizeof(*tbl));
   606		}
   607	
   608		/*
   609		 * Note: We currently don't support runtime services on an EFI
   610		 * that doesn't match the kernel 32/64-bit mode.
   611		 */
   612	
   613		if (!efi_runtime_supported())
   614			pr_info("No EFI runtime due to 32/64-bit mismatch with kernel\n");
   615		else {
   616			if (efi_runtime_disabled() || efi_runtime_init()) {
   617				efi_memmap_unmap();
   618				return;
   619			}
   620		}
   621	
   622		efi_clean_memmap();
   623	
   624		if (efi_enabled(EFI_DBG))
   625			efi_print_memmap();
   626	}
   627	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

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