Re: [PATCH v3 1/2] acpi: apei: remove the unused dead-code for SEA notification type

From: Borislav Petkov
Date: Fri Oct 13 2017 - 09:21:50 EST


On Thu, Sep 28, 2017 at 08:41:37PM +0800, Dongjiu Geng wrote:
> In current code logic, the two functions ghes_sea_add() and
> ghes_sea_remove() are only called when CONFIG_ACPI_APEI_SEA
> is defined. If not, it will return errors in the ghes_probe()
> and not continue. If the probe is failed, the ghes_sea_remove()
> also has no chance to be called. Hence, remove the unnecessary
> handling when CONFIG_ACPI_APEI_SEA is not defined.
>
> In the firmware-first RAS solution, the IPA fault address recorded
> by hpfar_el2 may be UNKNOWN, and also current code does not use it,
> so remove it.

...

> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index d661d45..c15a08d 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -813,7 +813,6 @@ static struct notifier_block ghes_notifier_hed = {
> .notifier_call = ghes_notify_hed,
> };
>
> -#ifdef CONFIG_ACPI_APEI_SEA
> static LIST_HEAD(ghes_sea);

But now those get compiled in on x86 where there's no SEA and where we
don't need them. So no, I don't think this patch is correct.

--
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix ImendÃrffer, Jane Smithard, Graham Norton, HRB 21284 (AG NÃrnberg)
--