From d7282762bcd12ba9d33a8f5106cc39bad9dfba45 Mon Sep 17 00:00:00 2001 From: Curtis Malainey Date: Tue, 13 Apr 2021 15:16:34 -0700 Subject: [PATCH] ipc3: don't declare unused variables ifdef the whole function out if we are not going to use it. Signed-off-by: Curtis Malainey --- src/ipc/handler-ipc3.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ipc/handler-ipc3.c b/src/ipc/handler-ipc3.c index 59a538292..d2fd4d75e 100644 --- a/src/ipc/handler-ipc3.c +++ b/src/ipc/handler-ipc3.c @@ -683,6 +683,12 @@ static int ipc_glb_pm_message(uint32_t header) /* * Debug IPC Operations. */ +#if CONFIG_SUECREEK || defined __ZEPHYR__ +static int ipc_dma_trace_config(uint32_t header) +{ + return 0; +} +#else static int ipc_dma_trace_config(uint32_t header) { #if CONFIG_HOST_PTABLE @@ -703,10 +709,6 @@ static int ipc_dma_trace_config(uint32_t header) else timer->delta = 0; -#if CONFIG_SUECREEK || defined __ZEPHYR__ - return 0; -#endif - #if CONFIG_HOST_PTABLE err = ipc_process_host_buffer(ipc, ¶ms.buffer, SOF_IPC_STREAM_CAPTURE, @@ -740,6 +742,7 @@ static int ipc_dma_trace_config(uint32_t header) error: return err; } +#endif /* CONFIG_SUECREEK || defined __ZEPHYR__ */ static int ipc_trace_filter_update(uint32_t header) {