* [efi:next 4/4] arch/x86//platform/efi/efi.c:598:11: warning: 'return' with a value, in function returning void
@ 2019-12-07 14:52 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-12-07 14:52 UTC (permalink / raw)
To: Ard Biesheuvel; +Cc: kbuild-all, linux-efi
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread* [efi:next 4/4] arch/x86//platform/efi/efi.c:598:11: warning: 'return' with a value, in function returning void
@ 2019-12-07 14:52 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-12-07 14:52 UTC (permalink / raw)
To: kbuild-all
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-07 14:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-12-07 14:52 ` kbuild test robot
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.