[PATCH v2] ACPI: APEI: GHES: Mark ghes_in_nmi_spool_from_list() as maybe unused
Rui Qi
qirui.001 at bytedance.com
Mon Jun 29 23:14:45 PDT 2026
When CONFIG_ACPI_APEI_SEA and CONFIG_HAVE_ACPI_APEI_NMI are both
disabled, ghes_in_nmi_spool_from_list() becomes an unused static
function and triggers -Werror=unused-function in some configs, for
example riscv defconfig with APEI disabled.
Mark it as __maybe_unused to silence the warning while keeping the
code available for configurations that use SEA or APEI NMI.
Reviewed-by: Breno Leitao <leitao at debian.org>
Reviewed-by: Hanjun Guo <guohanjun at huawei.com>
Reviewed-by: Shuai Xue <xueshuai at linux.alibaba.com>
Signed-off-by: Rui Qi <qirui.001 at bytedance.com>
---
Changes since the original submission:
- Resend with corrected Cc entries:
linux-acpi at vger.kernel.org and linux-riscv at lists.infradead.org.
- Add Reviewed-by tags received in the original thread.
Original thread:
https://lore.kernel.org/all/20260316082842.84356-1-qirui.001@bytedance.com/
No code changes.
drivers/acpi/apei/ghes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 3236a3ce79d6..48f915ee5a0d 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1397,8 +1397,8 @@ static int ghes_in_nmi_queue_one_entry(struct ghes *ghes,
return rc;
}
-static int ghes_in_nmi_spool_from_list(struct list_head *rcu_list,
- enum fixed_addresses fixmap_idx)
+static int __maybe_unused ghes_in_nmi_spool_from_list(struct list_head *rcu_list,
+ enum fixed_addresses fixmap_idx)
{
int ret = -ENOENT;
struct ghes *ghes;
--
2.20.1
More information about the linux-riscv
mailing list