linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 2/5] ACPI/APEI: Remove static from apei_hest_parse()
@ 2023-07-04 12:05 LeoLiu-oc
  2023-08-10 23:17 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: LeoLiu-oc @ 2023-07-04 12:05 UTC (permalink / raw)
  To: lenb, james.morse, tony.luck, bp, bhelgaas, robert.moore,
	leoliu-oc, linux-acpi, linux-kernel, linux-pci, acpica-devel

From: leoliu-oc <leoliu-oc@zhaoxin.com>

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@zhaoxin.com>
---
 drivers/acpi/apei/hest.c | 2 +-
 include/acpi/apei.h      | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index fb839a5c480ee..fd40c035c9b2e 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -132,7 +132,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 8a0b2b9edbafe..f975e4fe78fcb 100644
--- a/include/acpi/apei.h
+++ b/include/acpi/apei.h
@@ -37,9 +37,14 @@ 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.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-09-11 21:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-04 12:05 [PATCH v3 2/5] ACPI/APEI: Remove static from apei_hest_parse() LeoLiu-oc
2023-08-10 23:17 ` Bjorn Helgaas
2023-09-11  9:54   ` LeoLiu-oc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).