Skip to content

Commit fd936fd

Browse files
arndbardbiesheuvel
authored andcommitted
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 <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 095aabe commit fd936fd

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

drivers/acpi/apei/apei-internal.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#ifndef APEI_INTERNAL_H
88
#define APEI_INTERNAL_H
99

10-
#include <linux/cper.h>
1110
#include <linux/acpi.h>
1211

1312
struct apei_exec_context;
@@ -130,10 +129,5 @@ static inline u32 cper_estatus_len(struct acpi_hest_generic_status *estatus)
130129
return sizeof(*estatus) + estatus->data_length;
131130
}
132131

133-
void cper_estatus_print(const char *pfx,
134-
const struct acpi_hest_generic_status *estatus);
135-
int cper_estatus_check_header(const struct acpi_hest_generic_status *estatus);
136-
int cper_estatus_check(const struct acpi_hest_generic_status *estatus);
137-
138132
int apei_osc_setup(void);
139133
#endif

drivers/acpi/apei/bert.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/module.h>
2424
#include <linux/init.h>
2525
#include <linux/acpi.h>
26+
#include <linux/cper.h>
2627
#include <linux/io.h>
2728

2829
#include "apei-internal.h"

drivers/firmware/efi/libstub/efistub.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,4 +1133,7 @@ const u8 *__efi_get_smbios_string(const struct efi_smbios_record *record,
11331133
void efi_remap_image(unsigned long image_base, unsigned alloc_size,
11341134
unsigned long code_size);
11351135

1136+
asmlinkage efi_status_t __efiapi
1137+
efi_zboot_entry(efi_handle_t handle, efi_system_table_t *systab);
1138+
11361139
#endif

include/linux/cper.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,4 +572,10 @@ void cper_print_proc_ia(const char *pfx,
572572
int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg);
573573
int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg);
574574

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+
575581
#endif

include/linux/efi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,4 +1338,6 @@ bool efi_config_table_is_usable(const efi_guid_t *guid, unsigned long table)
13381338
return xen_efi_config_table_is_usable(guid, table);
13391339
}
13401340

1341+
umode_t efi_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n);
1342+
13411343
#endif /* _LINUX_EFI_H */

0 commit comments

Comments
 (0)