From 9e38358ae4a1f0e944d0e73a8128aa1bf59090d1 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Wed, 9 Oct 2024 17:37:37 +0300 Subject: [PATCH] zephyr: add sof/trace/preproc.h Add Zephyr version of sof/trace/preproc.h interface. The full preproc.h interface needed for CONFIG_TRACE is not duplicated here, so this commit effectively prevents using CONFIG_TRACE in Zephyr. Link: https://github.com/thesofproject/sof/issues/9015 Signed-off-by: Kai Vehmanen --- zephyr/include/sof/trace/preproc.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 zephyr/include/sof/trace/preproc.h diff --git a/zephyr/include/sof/trace/preproc.h b/zephyr/include/sof/trace/preproc.h new file mode 100644 index 000000000000..721fd95684ea --- /dev/null +++ b/zephyr/include/sof/trace/preproc.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * + * Copyright(c) 2024 Intel Corporation. + */ + +#ifndef __SOF_TRACE_PREPROC_H__ +#define __SOF_TRACE_PREPROC_H__ + +#ifdef CONFIG_TRACE +#error "SOF dma-trace (CONFIG_TRACE) not supported in Zephyr builds." +#endif + +#ifndef CONFIG_ZEPHYR_LOG + +/* + * Unlike the XTOS version of this macro, this does not silence all + * compiler warnings about unused variables. + */ +#define SOF_TRACE_UNUSED(arg1, ...) ((void)arg1) + +#endif /* CONFIG_ZEPHYR_LOG */ + +#endif /* __SOF_TRACE_PREPROC_H__ */