Skip to content

Commit 3c057d5

Browse files
committed
zephyr: include: sof: trace: Fix the trace level setting
Header has a guard to not reinclude logging header if it was already included but inside this guard there is a definition of SOF_ZEPHYR_TRACE_LEVEL which is later on used. So if log.h is already earlier included SOF_ZEPHYR_TRACE_LEVEL is not defined and compilation fails. Moving this definition outside of the guard because if log.h is already included LOG_LEVEL_INF is available. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
1 parent 0606152 commit 3c057d5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

zephyr/include/sof/trace/trace.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_H_
1010
#include <zephyr/logging/log.h>
1111
#include <zephyr/sys/printk.h>
12+
#endif
1213

1314
/* Level of SOF trace on Zephyr */
1415
#define SOF_ZEPHYR_TRACE_LEVEL LOG_LEVEL_INF
1516

16-
#endif
17-
1817
/* printk supports uint64_t so use it until LOG is ready */
1918
#define USE_PRINTK 1
2019

0 commit comments

Comments
 (0)