[PATCH v2 2/5] ACPI/APEI: Remove static from apei_hest_parse()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: leoliu-oc <leoliu-oc@xxxxxxxxxxx>

Each dev with AER capability needs to call the apei_hest_parse function to
match and extract register values from HEST PCIe AER structures.
Therefore, remove static from apei_hest_parse() so that it can be called
in another file.

Signed-off-by: leoliu-oc <leoliu-oc@xxxxxxxxxxx>
---
 drivers/acpi/apei/hest.c | 2 +-
 include/acpi/apei.h      | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index ab1ffe6923ce..1ac9afbff448 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -131,7 +131,7 @@ static bool hest_match_pci(struct acpi_hest_header *hest_hdr,
 	return false;
 }
 
-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 8a0b2b9edbaf..e7896491ae52 100644
--- a/include/acpi/apei.h
+++ b/include/acpi/apei.h
@@ -37,9 +37,11 @@ typedef int (*apei_hest_func_t)(struct acpi_hest_header *hest_hdr, void *data);
 
 #ifdef CONFIG_ACPI_APEI
 void __init acpi_hest_init(void);
+int apei_hest_parse(apei_hest_func_t func, void *data);
 int apei_hest_parse_aer(struct acpi_hest_header *hest_hdr, void *data);
 #else
 static inline void acpi_hest_init(void) { }
+static inline int apei_hest_parse(apei_hest_func_t func, void *data) { return -EINVAL; }
 static inline int apei_hest_parse_aer(struct acpi_hest_header *hest_hdr, void *data)
 {
 	return -EINVAL;
-- 
2.20.1




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux