[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210609071349.1336853-1-libaokun1@huawei.com>
Date: Wed, 9 Jun 2021 15:13:49 +0800
From: Baokun Li <libaokun1@...wei.com>
To: <linux-kernel@...r.kernel.org>, Vinod Koul <vkoul@...nel.org>,
"Michal Simek" <michal.simek@...inx.com>,
Romain Perier <romain.perier@...il.com>,
Allen Pais <allen.lkml@...il.com>, Yu Kuai <yukuai3@...wei.com>
CC: <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
<yangjihong1@...wei.com>, <libaokun1@...wei.com>,
<dmaengine@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<kernel-janitors@...r.kernel.org>, Hulk Robot <hulkci@...wei.com>
Subject: [PATCH -next v2] 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: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Baokun Li <libaokun1@...wei.com>
---
V1->V2:
CC mailist
drivers/dma/xilinx/zynqmp_dma.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
index 5fecf5aa6e85..97f02f8eb03a 100644
--- a/drivers/dma/xilinx/zynqmp_dma.c
+++ b/drivers/dma/xilinx/zynqmp_dma.c
@@ -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);
Powered by blists - more mailing lists