From: LeoLiu-oc <LeoLiu-oc@zhaoxin.com>
To: lenb@kernel.org, james.morse@arm.com, tony.luck@intel.com,
bp@alien8.de, bhelgaas@google.com, robert.moore@intel.com,
leoliu-oc@zhaoxin.com, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
acpica-devel@lists.linuxfoundation.org
Subject: [Acpica-devel] [PATCH v3 2/5] ACPI/APEI: Remove static from apei_hest_parse()
Date: Tue, 04 Jul 2023 12:16:39 -0000 [thread overview]
Message-ID: <20230704120517.1322195-1-LeoLiu-oc@zhaoxin.com> (raw)
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
next reply other threads:[~2023-07-04 12:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 12:16 LeoLiu-oc [this message]
2023-08-10 23:17 ` [Acpica-devel] [PATCH v3 2/5] ACPI/APEI: Remove static from apei_hest_parse() Bjorn Helgaas
2023-09-11 9:55 ` LeoLiu-oc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230704120517.1322195-1-LeoLiu-oc@zhaoxin.com \
--to=leoliu-oc@zhaoxin.com \
--cc=acpica-devel@lists.linuxfoundation.org \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=robert.moore@intel.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).