From c4bfdc6a7d3538ab9c96d1469f490e02bf00406f Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Wed, 10 Jan 2024 14:52:47 +0200 Subject: [PATCH] audio: dai-zephyr: Fix unused variable warning Move sink_list under CONFIG_IPC_MAJOR_4 in order to avoid the following variable unused warning: $ sof/src/audio/dai-zephyr.c: In function 'dai_dma_cb': $ sof_dir/sof/src/audio/dai-zephyr.c:259:35: warning: unused variable 'sink_list' [-Wunused-variable] 259 | struct list_item *sink_list; | ^~~~~~~~~ Signed-off-by: Daniel Baluta --- src/audio/dai-zephyr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/audio/dai-zephyr.c b/src/audio/dai-zephyr.c index 95812a25a377..ca5488c07231 100644 --- a/src/audio/dai-zephyr.c +++ b/src/audio/dai-zephyr.c @@ -255,8 +255,6 @@ dai_dma_cb(struct dai_data *dd, struct comp_dev *dev, uint32_t bytes, ret = dma_buffer_copy_to(dd->local_buffer, dd->dma_buffer, dd->process, bytes); } else { - struct list_item *sink_list; - audio_stream_invalidate(&dd->dma_buffer->stream, bytes); /* * The PCM converter functions used during DMA buffer copy can never fail, @@ -265,6 +263,7 @@ dai_dma_cb(struct dai_data *dd, struct comp_dev *dev, uint32_t bytes, ret = dma_buffer_copy_from_no_consume(dd->dma_buffer, dd->local_buffer, dd->process, bytes); #if CONFIG_IPC_MAJOR_4 + struct list_item *sink_list; /* Skip in case of endpoint DAI devices created by the copier */ if (converter) { /*