Message ID | 20250226121838.364533-2-LeoLiu-oc@zhaoxin.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Bjorn Helgaas |
Headers | show |
Series | Parse the HEST PCIe AER and set to relevant registers | expand |
On Wed, Feb 26, 2025 at 08:18:35PM +0800, LeoLiu-oc wrote: > From: LeoLiuoc <LeoLiu-oc@zhaoxin.com> > > Remove static from apei_hest_parse() so that it can be called in another > file. > +++ b/drivers/acpi/apei/hest.c > @@ -134,7 +134,7 @@ static bool is_ghes_assist_struct(struct acpi_hest_header *hest_hdr) > > typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data); > > -static int apei_hest_parse(apei_hest_func_t func, void *data) > +int apei_hest_parse(apei_hest_func_t func, void *data) > { > struct acpi_hest_header *hest_hdr; > int i, rc, len; > diff --git a/include/acpi/apei.h b/include/acpi/apei.h > index dc60f7db5524..b79976daa4bb 100644 > --- a/include/acpi/apei.h > +++ b/include/acpi/apei.h > @@ -33,6 +33,8 @@ void __init acpi_ghes_init(void); > static inline void acpi_ghes_init(void) { } > #endif > > +int apei_hest_parse(apei_hest_func_t func, void *data); Series doesn't build after this patch because we lack the apei_hest_func_t typedef: $ make drivers/acpi/apei/ CC drivers/acpi/apei/apei-base.o In file included from drivers/acpi/apei/apei-base.c:30: ./include/acpi/apei.h:36:21: error: unknown type name ‘apei_hest_func_t’ 36 | int apei_hest_parse(apei_hest_func_t func, void *data); | ^~~~~~~~~~~~~~~~ The kernel must build and function correctly after each and every patch in the series.
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c index 20d757687e3d..35d08f4e50e6 100644 --- a/drivers/acpi/apei/hest.c +++ b/drivers/acpi/apei/hest.c @@ -134,7 +134,7 @@ static bool is_ghes_assist_struct(struct acpi_hest_header *hest_hdr) typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data); -static int apei_hest_parse(apei_hest_func_t func, void *data) +int apei_hest_parse(apei_hest_func_t func, void *data) { struct acpi_hest_header *hest_hdr; int i, rc, len; diff --git a/include/acpi/apei.h b/include/acpi/apei.h index dc60f7db5524..b79976daa4bb 100644 --- a/include/acpi/apei.h +++ b/include/acpi/apei.h @@ -33,6 +33,8 @@ void __init acpi_ghes_init(void); static inline void acpi_ghes_init(void) { } #endif +int apei_hest_parse(apei_hest_func_t func, void *data); + #ifdef CONFIG_ACPI_APEI void __init acpi_hest_init(void); #else