Commit df208d63 authored by Baokun Li's avatar Baokun Li Committed by Vinod Koul
Browse files

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
Link: https://lore.kernel.org/r/20210609072802.1368785-1-libaokun1@huawei.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 75ba9a71
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -291,8 +291,7 @@ 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,
			list_move_tail(&dpaa2_comp->list,
				       &dpaa2_chan->comp_free);
		}
	}
@@ -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);
}