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

dmaengine: zynqmp_dma: 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/20210609071349.1336853-1-libaokun1@huawei.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent df208d63
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -434,8 +434,7 @@ static void zynqmp_dma_free_descriptor(struct zynqmp_dma_chan *chan,
	struct zynqmp_dma_desc_sw *child, *next;

	chan->desc_free_cnt++;
	list_del(&sdesc->node);
	list_add_tail(&sdesc->node, &chan->free_list);
	list_move_tail(&sdesc->node, &chan->free_list);
	list_for_each_entry_safe(child, next, &sdesc->tx_list, node) {
		chan->desc_free_cnt++;
		list_move_tail(&child->node, &chan->free_list);