]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dmaengine: xilinx_dma: Remove set but unused ‘tail_desc’
authorVinod Koul <vkoul@kernel.org>
Tue, 21 May 2019 14:06:44 +0000 (19:36 +0530)
committerVinod Koul <vkoul@kernel.org>
Wed, 22 May 2019 05:15:04 +0000 (10:45 +0530)
We get a compiler warn about variable ‘tail_desc’ set but not used

drivers/dma/xilinx/xilinx_dma.c:1102:42: warning:
variable ‘tail_desc’ set but not used [-Wunused-but-set-variable]
  struct xilinx_dma_tx_descriptor *desc, *tail_desc;

So remove it.

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xilinx_dma.c

index c43c1a154604bd8eed5da6b7d21f8af6ee082a9f..34564224e6757d4f42e08837992eff926fbe14dd 100644 (file)
@@ -1099,7 +1099,7 @@ static void xilinx_dma_start(struct xilinx_dma_chan *chan)
 static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
 {
        struct xilinx_vdma_config *config = &chan->config;
-       struct xilinx_dma_tx_descriptor *desc, *tail_desc;
+       struct xilinx_dma_tx_descriptor *desc;
        u32 reg, j;
        struct xilinx_vdma_tx_segment *segment, *last = NULL;
        int i = 0;
@@ -1116,8 +1116,6 @@ static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
 
        desc = list_first_entry(&chan->pending_list,
                                struct xilinx_dma_tx_descriptor, node);
-       tail_desc = list_last_entry(&chan->pending_list,
-                                   struct xilinx_dma_tx_descriptor, node);
 
        /* Configure the hardware using info in the config structure */
        if (chan->has_vflip) {