efi: fix missing prototype warnings
PATCH 1/1 efi: fix missing prototype warnings
From: Arnd Bergmann <[email protected]>
The cper.c file needs to include an extra header, and efi_zboot_entry needs an extern declaration to avoid these 'make W=1' warnings:
drivers/firmware/efi/libstub/zboot.c:65:1: error: no previous prototype for 'efi_zboot_entry' [-Werror=missing-prototypes] drivers/firmware/efi/efi.c:176:16: error: no previous prototype for 'efi_attr_is_visible' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:626:6: error: no previous prototype for 'cper_estatus_print' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:649:5: error: no previous prototype for 'cper_estatus_check_header' [-Werror=missing-prototypes] drivers/firmware/efi/cper.c:662:5: error: no previous prototype for 'cper_estatus_check' [-Werror=missing-prototypes]
--- drivers/firmware/efi/cper.c | 1 + drivers/firmware/efi/libstub/efistub.h | 3 +++ include/linux/efi.h | 2 ++ 3 files changed, 6 insertions(+)
drivers/firmware/efi/cper.c +1 -0
@@ -25,6 +25,7 @@#include <acpi/ghes.h> #include <ras/ras_event.h> #include "cper_cxl.h" +#include "../../acpi/apei/apei-internal.h" /* * CPER record ID need to be unique even after reboot, because record
drivers/firmware/efi/libstub/efistub.h +3 -0
@@ -1133,4 +1133,7 @@ const u8 *__efi_get_smbios_string(const struct efi_smbios_record *record,void efi_remap_image (unsigned long image_base,unsigned alloc_size,unsigned long code_size); +asmlinkage efi_status_t __efiapi +efi_zboot_entry (efi_handle_t handle,efi_system_table_t *systab); +#endif
include/linux/efi.h +2 -0
@@ -1338,4 +1338,6 @@ bool efi_config_table_is_usable(const efi_guid_t *guid, unsigned long table) return xen_efi_config_table_is_usable(guid, table); } +umode_t efi_attr_is_visible (struct kobject *kobj,struct attribute *attr,int n); +#endif /* _LINUX_EFI_H */
Signature · 1 line
2.39.2
Ard Biesheuvel
maintainerQuoted 25 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
cper.cfile needs to include an extra header, andefi_zboot_entryneeds an extern declaration to avoid these 'make W=1' warnings:
drivers/firmware/efi/libstub/zboot.c:65:1: error: no previous prototype for 'efi_zboot_entry' [-Werror=missing-prototypes]drivers/firmware/efi/efi.c:176:16: error: no previous prototype for 'efi_attr_is_visible' [-Werror=missing-prototypes]drivers/firmware/efi/cper.c:626:6: error: no previous prototype for 'cper_estatus_print' [-Werror=missing-prototypes]drivers/firmware/efi/cper.c:649:5: error: no previous prototype for 'cper_estatus_check_header' [-Werror=missing-prototypes]drivers/firmware/efi/cper.c:662:5: error: no previous prototype for 'cper_estatus_check' [-Werror=missing-prototypes]Signed-off-by Arnd Bergmann <[email protected]>--- drivers/firmware/efi/cper.c | 1 + drivers/firmware/efi/libstub/efistub.h | 3 +++ include/linux/efi.h | 2 ++ 3 files changed, 6 insertions(+)drivers/firmware/efi/cper.c +0
-0
drivers/firmware/efi/cper.c line 28
Quoted 4 lines
drivers/firmware/efi/cper.c +1
-0@@ -25,6 +25,7 @@#include <acpi/ghes.h> #include <ras/ras_event.h> #include "cper_cxl.h" +#include "../../acpi/apei/apei-internal.h"
Yuck. Could we move the missing definitions to linux/cper.h instead?
Quoted 29 lines
drivers/firmware/efi/cper.c +0
-0/* * CPER record ID need to be unique even after reboot, because record drivers/firmware/efi/libstub/efistub.h +3
-0@@ -1133,4 +1133,7 @@ const u8 *__efi_get_smbios_string(const struct efi_smbios_record *record,void efi_remap_image (unsigned long image_base,unsigned alloc_size,unsigned long code_size); +asmlinkage efi_status_t __efiapi +efi_zboot_entry (efi_handle_t handle,efi_system_table_t *systab); +#endif include/linux/efi.h +2
-1@@ -1338,4 +1338,6 @@ bool efi_config_table_is_usable(const efi_guid_t *guid, unsigned long table) return xen_efi_config_table_is_usable(guid, table); } +umode_t efi_attr_is_visible (struct kobject *kobj,struct attribute *attr,int n); +#endif /* _LINUX_EFI_H */ --2.39.2