[PATCH] ACPICA: scope acpi_ex_trace_point() to ACPI_DEBUG_OUTPUT

From: Pengpeng Hou

Date: Mon Mar 09 2026 - 05:30:04 EST


In current linux.git (1954c4f01220), acpi_ex_trace_point() is
defined and declared unconditionally. However, its only in-tree caller
is within the debug tracing path in drivers/acpi/acpica/utdebug.c,
which is guarded by #ifdef ACPI_DEBUG_OUTPUT.

Match the internal declaration and definition to that scope by wrapping
them in #ifdef ACPI_DEBUG_OUTPUT. This fixes the debug-scope mismatch
and avoids including tracing logic when ACPI debug output is disabled.

Signed-off-by: Pengpeng Hou <pengpeng.hou@xxxxxxxxxxxxxxxx>
---
diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h
--- a/drivers/acpi/acpica/acinterp.h
+++ b/drivers/acpi/acpica/acinterp.h
@@
void
acpi_ex_stop_trace_opcode(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);

+#ifdef ACPI_DEBUG_OUTPUT
void
acpi_ex_trace_point(acpi_trace_event_type type,
u8 begin, u8 *aml, char *pathname);
+#endif

void
acpi_ex_trace_args(union acpi_operand_object **params, u32 count);
diff --git a/drivers/acpi/acpica/extrace.c b/drivers/acpi/acpica/extrace.c
--- a/drivers/acpi/acpica/extrace.c
+++ b/drivers/acpi/acpica/extrace.c
@@
* DESCRIPTION: Internal interpreter execution trace.
*
******************************************************************************/

+#ifdef ACPI_DEBUG_OUTPUT
void
acpi_ex_trace_point(acpi_trace_event_type type,
u8 begin, u8 *aml, char *pathname)
{
@@
acpi_ex_get_trace_event_name(type),
begin ? "Begin" : "End", aml));
}
}
+#endif

/*******************************************************************************
*
* FUNCTION: acpi_ex_trace_args