diff mbox series

[-next] dmaengine: xilinx_dma: Use list_move_tail instead of list_del/list_add_tail

Message ID 20210608030905.2818831-1-libaokun1@huawei.com (mailing list archive)
State Accepted
Commit 75ba9a715cb65e9c3fb17f13929d8741e570795f
Headers show
Series [-next] dmaengine: xilinx_dma: Use list_move_tail instead of list_del/list_add_tail | expand

Commit Message

Baokun Li June 8, 2021, 3:09 a.m. UTC
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>
---
 drivers/dma/xilinx/xilinx_dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Radhey Shyam Pandey June 8, 2021, 1:16 p.m. UTC | #1
> -----Original Message-----
> From: Baokun Li <libaokun1@huawei.com>
> Sent: Tuesday, June 8, 2021 8:39 AM
> To: linux-kernel@vger.kernel.org; Vinod Koul <vkoul@kernel.org>; Michal
> Simek <michals@xilinx.com>; Radhey Shyam Pandey <radheys@xilinx.com>;
> Shravya Kumbham <shravyak@xilinx.com>; Matthew Murrian
> <matthew.murrian@goctsi.com>; Romain Perier
> <romain.perier@gmail.com>; Lars-Peter Clausen <lars@metafoo.de>;
> Krzysztof Kozlowski <krzk@kernel.org>; Allen Pais <allen.lkml@gmail.com>
> Cc: weiyongjun1@huawei.com; yuehaibing@huawei.com;
> yangjihong1@huawei.com; yukuai3@huawei.com; libaokun1@huawei.com;
> dmaengine@vger.kernel.org; linux-arm-kernel@lists.infradead.org; kernel-
> janitors@vger.kernel.org; Hulk Robot <hulkci@huawei.com>
> Subject: [PATCH -next] dmaengine: xilinx_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>

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Thanks!
> ---
>  drivers/dma/xilinx/xilinx_dma.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index 75c0b8e904e5..77022ef05ac5 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1411,8 +1411,7 @@ static void xilinx_vdma_start_transfer(struct
> xilinx_dma_chan *chan)
> 
>  	chan->desc_submitcount++;
>  	chan->desc_pendingcount--;
> -	list_del(&desc->node);
> -	list_add_tail(&desc->node, &chan->active_list);
> +	list_move_tail(&desc->node, &chan->active_list);
>  	if (chan->desc_submitcount == chan->num_frms)
>  		chan->desc_submitcount = 0;
>
Vinod Koul July 28, 2021, 6:35 a.m. UTC | #2
On 08-06-21, 11:09, Baokun Li wrote:
> Using list_move_tail() instead of list_del() + list_add_tail().

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 75c0b8e904e5..77022ef05ac5 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1411,8 +1411,7 @@  static void xilinx_vdma_start_transfer(struct xilinx_dma_chan *chan)
 
 	chan->desc_submitcount++;
 	chan->desc_pendingcount--;
-	list_del(&desc->node);
-	list_add_tail(&desc->node, &chan->active_list);
+	list_move_tail(&desc->node, &chan->active_list);
 	if (chan->desc_submitcount == chan->num_frms)
 		chan->desc_submitcount = 0;