Re: [PATCH 1/6] ACPI: extlog: fix extlog_mem_event build issue
From: Jonathan Cameron
Date: Mon Oct 19 2026 - 13:27:28 EST
On Mon, 19 Oct 2026 16:56:08 +0200
Pierre Gondois <pierre.gondois@xxxxxxx> wrote:
> With CONFIG_ACPI_EXTLOG=n and with the following command:
> make -j4 drivers/acpi/acpi_extlog.o drivers/acpi/
>
> trace_extlog_mem_event() is not defined. Add a extlog_mem_err_event()
> wrapper to fix the build issue.
>
> Signed-off-by: Pierre Gondois <pierre.gondois@xxxxxxx>
I'm lost. This file is normally only built if
CONFIG_ACPI_EXTLOG is not = "n" so how do you get to this code.
Ah you are forcing build of a file...
If you do need to do this sort of ifdefery it belongs in a header with
the function cleanly stubbed rather than in here.
Anyhow, far as I can tell this doesn't make any sense for
upstream.
J
> ---
> drivers/acpi/acpi_extlog.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
> index 7ad3b36013cc..e764d61f71ca 100644
> --- a/drivers/acpi/acpi_extlog.c
> +++ b/drivers/acpi/acpi_extlog.c
> @@ -180,6 +180,15 @@ extlog_cxl_cper_handle_prot_err(struct cxl_cper_sec_prot_err *prot_err,
> #endif
> }
>
> +static void
> +extlog_mem_err_event(struct cper_sec_mem_err *mem, u32 err_seq,
> + const guid_t *fru_id, const char *fru_text, u8 sev)
> +{
> +#if defined(CONFIG_ACPI_EXTLOG) || defined(CONFIG_ACPI_EXTLOG_MODULE)
> + trace_extlog_mem_event(mem, err_seq, fru_id, fru_text, sev);
> +#endif
> +}
> +
> static int extlog_print(struct notifier_block *nb, unsigned long val,
> void *data)
> {
> @@ -229,8 +238,9 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
> struct cper_sec_mem_err *mem = acpi_hest_get_payload(gdata);
>
> if (gdata->error_data_length >= sizeof(*mem))
> - trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
> - (u8)gdata->error_severity);
> + extlog_mem_err_event(mem, err_seq, fru_id,
> + fru_text,
> + (u8)gdata->error_severity);
> } else if (guid_equal(sec_type, &CPER_SEC_CXL_PROT_ERR)) {
> struct cxl_cper_sec_prot_err *prot_err =
> acpi_hest_get_payload(gdata);