dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next v2] dmaengine: fsl-dpaa2-qdma: Use list_move_tail instead of list_del/list_add_tail
@ 2021-06-09  7:28 Baokun Li
  2021-07-28  6:36 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Baokun Li @ 2021-06-09  7:28 UTC (permalink / raw)
  To: linux-kernel, Vinod Koul, Zhen Lei
  Cc: weiyongjun1, yuehaibing, yangjihong1, yukuai3, libaokun1,
	dmaengine, kernel-janitors, Hulk Robot

Using list_move_tail() instead of list_del() + list_add_tail().

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
V1->V2:
	CC mailist

 drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
index 4ae057922ef1..a0358f2c5cbb 100644
--- a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
+++ b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
@@ -291,9 +291,8 @@ static void dpaa2_qdma_issue_pending(struct dma_chan *chan)
 
 		err = dpaa2_io_service_enqueue_fq(NULL, dpaa2_chan->fqid, fd);
 		if (err) {
-			list_del(&dpaa2_comp->list);
-			list_add_tail(&dpaa2_comp->list,
-				      &dpaa2_chan->comp_free);
+			list_move_tail(&dpaa2_comp->list,
+				       &dpaa2_chan->comp_free);
 		}
 	}
 err_enqueue:
@@ -626,8 +625,7 @@ static void dpaa2_qdma_free_desc(struct virt_dma_desc *vdesc)
 	dpaa2_comp = to_fsl_qdma_comp(vdesc);
 	qchan = dpaa2_comp->qchan;
 	spin_lock_irqsave(&qchan->queue_lock, flags);
-	list_del(&dpaa2_comp->list);
-	list_add_tail(&dpaa2_comp->list, &qchan->comp_free);
+	list_move_tail(&dpaa2_comp->list, &qchan->comp_free);
 	spin_unlock_irqrestore(&qchan->queue_lock, flags);
 }
 


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

* Re: [PATCH -next v2] dmaengine: fsl-dpaa2-qdma: Use list_move_tail instead of list_del/list_add_tail
  2021-06-09  7:28 [PATCH -next v2] dmaengine: fsl-dpaa2-qdma: Use list_move_tail instead of list_del/list_add_tail Baokun Li
@ 2021-07-28  6:36 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-07-28  6:36 UTC (permalink / raw)
  To: Baokun Li
  Cc: linux-kernel, Zhen Lei, weiyongjun1, yuehaibing, yangjihong1,
	yukuai3, dmaengine, kernel-janitors, Hulk Robot

On 09-06-21, 15:28, Baokun Li wrote:
> Using list_move_tail() instead of list_del() + list_add_tail().

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2021-07-28  6:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  7:28 [PATCH -next v2] dmaengine: fsl-dpaa2-qdma: Use list_move_tail instead of list_del/list_add_tail Baokun Li
2021-07-28  6:36 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).