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

Radhey Shyam Pandey radheys at xilinx.com
Tue Jun 8 06:16:56 PDT 2021


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

Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey at 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;
> 




More information about the linux-arm-kernel mailing list