DMA Engine development
 help / color / mirror / Atom feed
* [14/20] dmaengine: st_fdma: drop useless LIST_HEAD
@ 2018-12-23  8:57 Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2018-12-23  8:57 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: kernel-janitors, Dan Williams, Vinod Koul, linux-arm-kernel,
	dmaengine, linux-kernel

Drop LIST_HEAD where the variable it declares is never used.

The declarations were introduced with the file, but the declared
variables were not used.

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

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

Fixes: 6b4cd727eaf1 ("dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support")
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
Successfully 0-day tested on 151 configurations.

 drivers/dma/st_fdma.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/dma/st_fdma.c b/drivers/dma/st_fdma.c
index 07c20aa2e955..954f7cf62bb1 100644
--- a/drivers/dma/st_fdma.c
+++ b/drivers/dma/st_fdma.c
@@ -294,8 +294,6 @@ static void st_fdma_free_chan_res(struct dma_chan *chan)
 	struct rproc *rproc = fchan->fdev->slim_rproc->rproc;
 	unsigned long flags;
 
-	LIST_HEAD(head);
-
 	dev_dbg(fchan->fdev->dev, "%s: freeing chan:%d\n",
 		__func__, fchan->vchan.chan.chan_id);
 
@@ -626,7 +624,6 @@ static void st_fdma_issue_pending(struct dma_chan *chan)
 static int st_fdma_pause(struct dma_chan *chan)
 {
 	unsigned long flags;
-	LIST_HEAD(head);
 	struct st_fdma_chan *fchan = to_st_fdma_chan(chan);
 	int ch_id = fchan->vchan.chan.chan_id;
 	unsigned long cmd = FDMA_CMD_PAUSE(ch_id);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [14/20] dmaengine: st_fdma: drop useless LIST_HEAD
@ 2019-01-02  6:03 Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2019-01-02  6:03 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Patrice Chotard, kernel-janitors, Dan Williams, linux-arm-kernel,
	dmaengine, linux-kernel

On 23-12-18, 09:57, Julia Lawall wrote:
> Drop LIST_HEAD where the variable it declares is never used.
> 
> The declarations were introduced with the file, but the declared
> variables were not used.
> 
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @@
> identifier x;
> @@
> - LIST_HEAD(x);
>   ... when != x
> // </smpl>
> 
> Fixes: 6b4cd727eaf1 ("dmaengine: st_fdma: Add STMicroelectronics FDMA engine driver support")
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Applied, thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-02  6:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-02  6:03 [14/20] dmaengine: st_fdma: drop useless LIST_HEAD Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2018-12-23  8:57 Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox