trace: Fix compilation error when CONFIG_TRACE not set

Introduce dummy trace functions for when CONFIG_TRACE
is not set to avoid undefined reference to function error.

src/ipc/handler.c.o: In function `ipc_glb_tplg_buffer_new':
src/ipc/handler.c:1094: undefined reference to `trace_on'

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This commit is contained in:
Daniel Baluta 2020-04-03 16:09:53 +03:00 committed by Daniel Baluta
parent 757b13c123
commit 0d9eefbda4
1 changed files with 10 additions and 5 deletions

View File

@ -169,11 +169,6 @@ _TRACE_EVENT_NTH_DECLARE_GROUP(4)
#define _TRACE_EVENT_MAX_ARGUMENT_COUNT 4
void trace_flush(void);
void trace_on(void);
void trace_off(void);
void trace_init(struct sof *sof);
static inline struct trace *trace_get(void)
{
return sof_get()->trace;
@ -236,6 +231,11 @@ static inline struct trace *trace_get(void)
id_0, id_1, id_2, \
format, ##__VA_ARGS__)
void trace_flush(void);
void trace_on(void);
void trace_off(void);
void trace_init(struct sof *sof);
#if CONFIG_TRACEM
/* send all trace to mbox and local trace buffer */
#define __mbox _mbox
@ -351,6 +351,11 @@ do { \
#define trace_point(x) do {} while (0)
static inline void trace_flush(void) { }
static inline void trace_on(void) { }
static inline void trace_off(void) { }
static inline void trace_init(struct sof *sof) { }
#endif
/* verbose tracing */