All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: kbuild-all@lists.01.org, linux-efi@vger.kernel.org
Subject: [efi:next 4/4] arch/x86//platform/efi/efi.c:598:11: warning: 'return' with a value, in function returning void
Date: Sat, 7 Dec 2019 22:52:44 +0800	[thread overview]
Message-ID: <201912072242.dfLkYMvr%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3232 bytes --]

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

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@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 71024 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [efi:next 4/4] arch/x86//platform/efi/efi.c:598:11: warning: 'return' with a value, in function returning void
Date: Sat, 07 Dec 2019 22:52:44 +0800	[thread overview]
Message-ID: <201912072242.dfLkYMvr%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3330 bytes --]

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

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(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 71024 bytes --]

             reply	other threads:[~2019-12-07 14:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-07 14:52 kbuild test robot [this message]
2019-12-07 14:52 ` [efi:next 4/4] arch/x86//platform/efi/efi.c:598:11: warning: 'return' with a value, in function returning void kbuild test robot

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=201912072242.dfLkYMvr%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ardb@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-efi@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.