Re: [PATCH v4 05/10] riscv: conditionally compile GHES NMI spool function

From: Sunil V L

Date: Tue Jun 09 2026 - 04:31:57 EST


On Wed, May 13, 2026 at 2:14 PM Himanshu Chauhan
<himanshu.chauhan@xxxxxxxxxxxxxxxx> wrote:
>
> Compile ghes_in_nmi_spool_from_list only when NMI and SEA
> is enabled. Otherwise compilation fails with "defined but
> not used" error.
>
> Signed-off-by: Himanshu Chauhan <himanshu.chauhan@xxxxxxxxxxxxxxxx>
> ---
> drivers/acpi/apei/ghes.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index 3236a3ce79d6..8edc2c8db1bb 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -1397,6 +1397,7 @@ static int ghes_in_nmi_queue_one_entry(struct ghes *ghes,
> return rc;
> }
>
> +#if defined(CONFIG_HAVE_ACPI_APEI_NMI) || defined(CONFIG_ACPI_APEI_SEA)
>
> static int ghes_in_nmi_spool_from_list(struct list_head *rcu_list,
> enum fixed_addresses fixmap_idx)
> {
> @@ -1415,6 +1416,7 @@ static int ghes_in_nmi_spool_from_list(struct list_head *rcu_list,
>
> return ret;
> }
> +#endif
>
Reviewed-by: Sunil V L <sunilvl@xxxxxxxxxxxxxxxx>