Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

efi: fix missing prototype warnings

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]

To make this easier, move the cper specific declarations to
include/linux/cper.h.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

authored by

Arnd Bergmann and committed by
Ard Biesheuvel
fd936fd8 095aabe3

+12 -6
-6
drivers/acpi/apei/apei-internal.h
··· 7 7 #ifndef APEI_INTERNAL_H 8 8 #define APEI_INTERNAL_H 9 9 10 - #include <linux/cper.h> 11 10 #include <linux/acpi.h> 12 11 13 12 struct apei_exec_context; ··· 128 129 else 129 130 return sizeof(*estatus) + estatus->data_length; 130 131 } 131 - 132 - void cper_estatus_print(const char *pfx, 133 - const struct acpi_hest_generic_status *estatus); 134 - int cper_estatus_check_header(const struct acpi_hest_generic_status *estatus); 135 - int cper_estatus_check(const struct acpi_hest_generic_status *estatus); 136 132 137 133 int apei_osc_setup(void); 138 134 #endif
+1
drivers/acpi/apei/bert.c
··· 23 23 #include <linux/module.h> 24 24 #include <linux/init.h> 25 25 #include <linux/acpi.h> 26 + #include <linux/cper.h> 26 27 #include <linux/io.h> 27 28 28 29 #include "apei-internal.h"
+3
drivers/firmware/efi/libstub/efistub.h
··· 1133 1133 void efi_remap_image(unsigned long image_base, unsigned alloc_size, 1134 1134 unsigned long code_size); 1135 1135 1136 + asmlinkage efi_status_t __efiapi 1137 + efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab); 1138 + 1136 1139 #endif
+6
include/linux/cper.h
··· 572 572 int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg); 573 573 int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg); 574 574 575 + struct acpi_hest_generic_status; 576 + void cper_estatus_print(const char *pfx, 577 + const struct acpi_hest_generic_status *estatus); 578 + int cper_estatus_check_header(const struct acpi_hest_generic_status *estatus); 579 + int cper_estatus_check(const struct acpi_hest_generic_status *estatus); 580 + 575 581 #endif
+2
include/linux/efi.h
··· 1338 1338 return xen_efi_config_table_is_usable(guid, table); 1339 1339 } 1340 1340 1341 + umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n); 1342 + 1341 1343 #endif /* _LINUX_EFI_H */