diff options
author | Baokun Li <libaokun1@huawei.com> | 2021-06-09 10:28:02 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-07-28 09:36:22 +0300 |
commit | df208d63cfc5128529059d28565bd8754da2dbd5 (patch) | |
tree | 9262a828b66bba0b04bc53274812e98f9abc27c8 /drivers/dma/fsl-dpaa2-qdma | |
parent | 75ba9a715cb65e9c3fb17f13929d8741e570795f (diff) | |
download | linux-df208d63cfc5128529059d28565bd8754da2dbd5.tar.xz |
dmaengine: fsl-dpaa2-qdma: Use list_move_tail instead of list_del/list_add_tail
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>
Link: https://lore.kernel.org/r/20210609072802.1368785-1-libaokun1@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/fsl-dpaa2-qdma')
-rw-r--r-- | drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c | 8 |
1 files 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); } |