From 42c03acbacc9c04a41862e26e31f1b9e09eff736 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Wed, 18 Sep 2024 22:16:18 +0300 Subject: [PATCH] include: sof: trace: don't place trace ctx in special section If trace is disabled (i.e: CONFIG_TRACE=n) there's no need to place the trace context inside a special linker section (i.e: .trace_ctx). This spares platforms that don't use trace from having to include the .trace_ctx section inside their linker scripts. Signed-off-by: Laurentiu Mihalcea --- src/include/sof/trace/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/sof/trace/trace.h b/src/include/sof/trace/trace.h index d1beb48d81e2..9da28fab36a3 100644 --- a/src/include/sof/trace/trace.h +++ b/src/include/sof/trace/trace.h @@ -393,7 +393,7 @@ struct tr_ctx { uint32_t level; /**< Default log level */ }; -#if defined(UNIT_TEST) +#if defined(UNIT_TEST) || !defined(CONFIG_TRACE) #define TRACE_CONTEXT_SECTION #else #define TRACE_CONTEXT_SECTION __section(".trace_ctx")