Skip to contentSkip to conversation

dmaengine: zynqmp_dma: Use list_move_tail instead of list_del/list_add_tail

PATCH Applied Baokun Li 2 participants 2 messages Jun 9, 2021 – Jul 28, 2021

Subsystems (3)
lore
Share & tools
lore

Baokun Li

author
#0 lore raw

PATCH v2 1/1 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().

---
V1->V2:
CC mailist

 drivers/dma/xilinx/zynqmp_dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/xilinx/zynqmp_dma.c +1 -2
index 5fecf5aa6e85..97f02f8eb03a 100644
@@ -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);
maintainer Applied
#1 lore raw
Quoted 1 line · Baokun Li

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

Applied, thanks

Signature · 1 line
~Vinod