Skip to content

Commit

Permalink
zephyr: include: sof: trace: Fix the trace level setting
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nordic-krch committed Jan 31, 2024
1 parent 0606152 commit 3c057d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zephyr/include/sof/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
#ifndef ZEPHYR_INCLUDE_LOGGING_LOG_H_
#include <zephyr/logging/log.h>
#include <zephyr/sys/printk.h>
#endif

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

#endif

/* printk supports uint64_t so use it until LOG is ready */
#define USE_PRINTK 1

Expand Down

0 comments on commit 3c057d5

Please sign in to comment.