ipc3: don't declare unused variables

ifdef the whole function out if we are not going to use it.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This commit is contained in:
Curtis Malainey 2021-04-13 15:16:34 -07:00 committed by Keyon Jie
parent 34dd107300
commit d7282762bc
1 changed files with 7 additions and 4 deletions

View File

@ -683,6 +683,12 @@ static int ipc_glb_pm_message(uint32_t header)
/* /*
* Debug IPC Operations. * 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) static int ipc_dma_trace_config(uint32_t header)
{ {
#if CONFIG_HOST_PTABLE #if CONFIG_HOST_PTABLE
@ -703,10 +709,6 @@ static int ipc_dma_trace_config(uint32_t header)
else else
timer->delta = 0; timer->delta = 0;
#if CONFIG_SUECREEK || defined __ZEPHYR__
return 0;
#endif
#if CONFIG_HOST_PTABLE #if CONFIG_HOST_PTABLE
err = ipc_process_host_buffer(ipc, &params.buffer, err = ipc_process_host_buffer(ipc, &params.buffer,
SOF_IPC_STREAM_CAPTURE, SOF_IPC_STREAM_CAPTURE,
@ -740,6 +742,7 @@ static int ipc_dma_trace_config(uint32_t header)
error: error:
return err; return err;
} }
#endif /* CONFIG_SUECREEK || defined __ZEPHYR__ */
static int ipc_trace_filter_update(uint32_t header) static int ipc_trace_filter_update(uint32_t header)
{ {