dmaengine: dw: drop useless LIST_HEAD
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 23 Dec 2018 08:57:07 +0000 (09:57 +0100)
committerVinod Koul <vkoul@kernel.org>
Mon, 7 Jan 2019 04:19:26 +0000 (09:49 +0530)
Drop LIST_HEAD where the variable it declares is never used.

Commit ab703f818ac3 ("dmaengine: dw: lazy allocation of dma
descriptors") removed the uses, but not the declaration.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
  ... when != x
// </smpl>

Fixes: ab703f818ac3 ("dmaengine: dw: lazy allocation of dma descriptors")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dw/core.c

index dc053e62f8945b83665263a2a27a8db5f33d299a..290d21be4d4cd1496891a8a4e038432563ba9b9d 100644 (file)
@@ -1150,7 +1150,6 @@ static void dwc_free_chan_resources(struct dma_chan *chan)
        struct dw_dma_chan      *dwc = to_dw_dma_chan(chan);
        struct dw_dma           *dw = to_dw_dma(chan->device);
        unsigned long           flags;
-       LIST_HEAD(list);
 
        dev_dbg(chan2dev(chan), "%s: descs allocated=%u\n", __func__,
                        dwc->descs_allocated);