From 7bfd21e828504e3b7dd923bea5474ffdf204f264 Mon Sep 17 00:00:00 2001 From: Rui Qi Date: Tue, 30 Jun 2026 14:14:45 +0800 Subject: [PATCH] ACPI: APEI: GHES: Mark ghes_in_nmi_spool_from_list() as maybe unused 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 Reviewed-by: Hanjun Guo Reviewed-by: Shuai Xue Signed-off-by: Rui Qi Link: https://patch.msgid.link/20260630061445.2191731-1-qirui.001@bytedance.com Signed-off-by: Rafael J. Wysocki --- 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;