From 3438e809dfdd18e324b71469feff7c86b797fee7 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Sat, 3 Jul 2021 05:18:57 +0000 Subject: [PATCH] Fix !CONFIG_TRACE again, broken when adding mtrace_printf() Fixes commit 50eb5c9ca22b ("trace.c: add mtrace_printf() low-level shortcut") Signed-off-by: Marc Herbert --- src/include/sof/trace/trace.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/include/sof/trace/trace.h b/src/include/sof/trace/trace.h index 36fea9f391fa..b8d68b0d5ce3 100644 --- a/src/include/sof/trace/trace.h +++ b/src/include/sof/trace/trace.h @@ -413,6 +413,8 @@ struct tr_ctx { _TRACE_INV_ID, _TRACE_INV_ID, \ fmt, ##__VA_ARGS__) +#if CONFIG_TRACE + /** Direct, low-level access to mbox / shared memory logging when DMA * tracing is either not initialized yet or disabled or found broken for * any reason. @@ -440,4 +442,12 @@ void mtrace_dict_entry(uint32_t log_entry_pointer, int n_args, ...); /** Posts a fully prepared log header + log entry */ void mtrace_event(const char *complete_packet, uint32_t length); +#else + +static inline void mtrace_printf(int log_level, const char *format_str, ...) +{ +}; + +#endif /* CONFIG_TRACE */ + #endif /* __SOF_TRACE_TRACE_H__ */