]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commitdiff
dma: xilinx: xilinx_dma: Fix compilation warning
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Tue, 17 Oct 2017 10:32:15 +0000 (16:02 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 17 Oct 2017 10:57:46 +0000 (12:57 +0200)
This patch fixes the below sparse warning in the driver
drivers/dma/xilinx/xilinx_dma.c: In function ‘xilinx_vdma_dma_prep_interleaved’:
drivers/dma/xilinx/xilinx_dma.c:1589:43: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable]
  struct xilinx_vdma_tx_segment *segment, *prev = NULL;

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/dma/xilinx/xilinx_dma.c

index 414614e007ba73524e056f751817c73f07f246b5..5f11625fca6ca98df11a269df1992daa8c429c21 100644 (file)
@@ -1586,7 +1586,7 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan,
 {
        struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
        struct xilinx_dma_tx_descriptor *desc;
-       struct xilinx_vdma_tx_segment *segment, *prev = NULL;
+       struct xilinx_vdma_tx_segment *segment;
        struct xilinx_vdma_desc_hw *hw;
 
        if (!is_slave_direction(xt->dir))
@@ -1640,8 +1640,6 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan,
        /* Insert the segment into the descriptor segments list. */
        list_add_tail(&segment->node, &desc->segments);
 
-       prev = segment;
-
        /* Link the last hardware descriptor with the first. */
        segment = list_first_entry(&desc->segments,
                                   struct xilinx_vdma_tx_segment, node);