Skip to content

Commit

Permalink
audio: dai-zephyr: Fix unused variable warning
Browse files Browse the repository at this point in the history
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 <daniel.baluta@nxp.com>
  • Loading branch information
dbaluta committed Jan 15, 2024
1 parent c8eb216 commit c4bfdc6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/audio/dai-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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) {
/*
Expand Down

0 comments on commit c4bfdc6

Please sign in to comment.