All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI: APEI: ghes: mark ghes_in_nmi_spool_from_list maybe unused
@ 2026-03-16  8:28 Rui Qi
  2026-03-16  9:03 ` Breno Leitao
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Rui Qi @ 2026-03-16  8:28 UTC (permalink / raw)
  To: rafael, tony.luck, bp, guohanjun, mchehab, xueshuai, lenb, pjw,
	palmer, aou, alex, jonathan.cameron, fabio.m.de.francesco, leitao,
	jason
  Cc: inux-acpi, linux-kernel, inux-riscv, Rui Qi

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 (e.g.
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.

Signed-off-by: Rui Qi <qirui.001@bytedance.com>
---
 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 8acd2742bb27..1fe45949749f 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1379,8 +1379,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

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

end of thread, other threads:[~2026-04-07  1:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16  8:28 [PATCH] ACPI: APEI: ghes: mark ghes_in_nmi_spool_from_list maybe unused Rui Qi
2026-03-16  9:03 ` Breno Leitao
2026-03-17  3:55   ` Rui Qi
2026-03-17  9:39     ` Breno Leitao
2026-03-23  8:14       ` Hanjun Guo
2026-03-17  9:39 ` Breno Leitao
2026-03-23  8:15 ` Hanjun Guo
2026-04-07  1:31 ` Shuai Xue

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.