diff options
author | Baokun Li <libaokun1@huawei.com> | 2021-06-09 15:13:49 +0800 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-07-28 12:06:22 +0530 |
commit | 48594dbf793a15ee1a63ed879691cf436c14f459 (patch) | |
tree | 9863b9d82f573145c19d16afc66cd34856828590 /drivers/dma/xilinx/zynqmp_dma.c | |
parent | df208d63cfc5128529059d28565bd8754da2dbd5 (diff) | |
download | linux-stable-48594dbf793a15ee1a63ed879691cf436c14f459.tar.gz linux-stable-48594dbf793a15ee1a63ed879691cf436c14f459.tar.bz2 linux-stable-48594dbf793a15ee1a63ed879691cf436c14f459.zip |
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@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>
Diffstat (limited to 'drivers/dma/xilinx/zynqmp_dma.c')
-rw-r--r-- | drivers/dma/xilinx/zynqmp_dma.c | 3 |
1 files changed, 1 insertions, 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); |