drivers: firmware: Move prototype declartions to header file cper.h
PATCH 1/1 drivers: firmware: Move prototype declartions to header file cper.h
Move prototype declarations of function cper_estatus_print(), cper_estatus_check_header() and cper_estatus_check() from file drivers/acpi/apei/apei-internal.h to header file include/linux/cper.h because these functions are used by both acpi driver and firmware driver.
The header file include/linux/cper.h was chosen because it is included in both the drivers.
This eliminates the following warnings in efi/cper.c:drivers/firmware/efi/cper.c:346:6: warning: no previous prototype for ‘cper_estatus_print’ [-Wmissing-prototypes] drivers/firmware/efi/cper.c:374:5: warning: no previous prototype for ‘cper_estatus_check_header’ [-Wmissing-prototypes] drivers/firmware/efi/cper.c:387:5: warning: no previous prototype for ‘cper_estatus_check’ [-Wmissing-prototypes]
--- drivers/acpi/apei/apei-internal.h | 5 ----- include/linux/cper.h | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-)
drivers/acpi/apei/apei-internal.h +0 -5
@@ -135,10 +135,5 @@ static inline u32 cper_estatus_len(struct acpi_generic_status *estatus) return sizeof(*estatus) + estatus->data_length; } -void cper_estatus_print (const char *pfx, -const struct acpi_generic_status *estatus); -int cper_estatus_check_header (const struct acpi_generic_status *estatus); -int cper_estatus_check (const struct acpi_generic_status *estatus); -int apei_osc_setup (void );#endif
include/linux/cper.h +8 -0
@@ -22,6 +22,14 @@#define LINUX_CPER_H #include <linux/uuid.h> +#include <linux/acpi.h> + +/* Prototype declaration of functions common between acpi and firmware driver*/ +void cper_estatus_print (const char *pfx, +const struct acpi_generic_status *estatus); +int cper_estatus_check_header (const struct acpi_generic_status *estatus); +int cper_estatus_check (const struct acpi_generic_status *estatus); +/* CPER record signature and the size */ #define CPER_SIG_RECORD "CPER"
Signature · 6 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html