2021-06-08 03:03:49

by Baokun Li

[permalink] [raw]
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 <[email protected]>
Signed-off-by: Baokun Li <[email protected]>
---
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;



2021-06-09 01:36:26

by Radhey Shyam Pandey

[permalink] [raw]
Subject: RE: [PATCH -next] dmaengine: xilinx_dma: Use list_move_tail instead of list_del/list_add_tail

> -----Original Message-----
> From: Baokun Li <[email protected]>
> Sent: Tuesday, June 8, 2021 8:39 AM
> To: [email protected]; Vinod Koul <[email protected]>; Michal
> Simek <[email protected]>; Radhey Shyam Pandey <[email protected]>;
> Shravya Kumbham <[email protected]>; Matthew Murrian
> <[email protected]>; Romain Perier
> <[email protected]>; Lars-Peter Clausen <[email protected]>;
> Krzysztof Kozlowski <[email protected]>; Allen Pais <[email protected]>
> Cc: [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; kernel-
> [email protected]; Hulk Robot <[email protected]>
> 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 <[email protected]>
> Signed-off-by: Baokun Li <[email protected]>

Reviewed-by: Radhey Shyam Pandey <[email protected]>
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;
>

2021-07-28 06:37:29

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH -next] dmaengine: xilinx_dma: Use list_move_tail instead of list_del/list_add_tail

On 08-06-21, 11:09, Baokun Li wrote:
> Using list_move_tail() instead of list_del() + list_add_tail().

Applied, thanks

--
~Vinod