dmaengine: zynqmp_dma: Use list_move_tail instead of list_del/list_add_tail
authorBaokun Li <libaokun1@huawei.com>
Wed, 9 Jun 2021 07:13:49 +0000 (15:13 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 28 Jul 2021 06:36:22 +0000 (12:06 +0530)
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/20210609071349.1336853-1-libaokun1@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/zynqmp_dma.c

index 5fecf5a..97f02f8 100644 (file)
@@ -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);