Re: [PATCH] ACPI: APEI: ghes: mark ghes_in_nmi_spool_from_list maybe unused

From: Breno Leitao

Date: Tue Mar 17 2026 - 05:41:44 EST


On Mon, Mar 16, 2026 at 04:28:42PM +0800, Rui Qi wrote:
> 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@xxxxxxxxxxxxx>

Reviewed-by: Breno Leitao <leitao@xxxxxxxxxx>