[PATCH 5/5] dmaengine: sprd: Don't set chancnt

Jisheng Zhang posted 5 patches 2 years, 11 months ago
There is a newer version of this series
[PATCH 5/5] dmaengine: sprd: Don't set chancnt
Posted by Jisheng Zhang 2 years, 11 months ago
The dma framework will calculate the dma channels chancnt, setting it
outself is wrong.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
 drivers/dma/sprd-dma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index 474d3ba8ec9f..2b639adb48ba 100644
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -1169,7 +1169,6 @@ static int sprd_dma_probe(struct platform_device *pdev)
 
 	dma_cap_set(DMA_MEMCPY, sdev->dma_dev.cap_mask);
 	sdev->total_chns = chn_count;
-	sdev->dma_dev.chancnt = chn_count;
 	INIT_LIST_HEAD(&sdev->dma_dev.channels);
 	INIT_LIST_HEAD(&sdev->dma_dev.global_node);
 	sdev->dma_dev.dev = &pdev->dev;
-- 
2.39.2
Re: [PATCH 5/5] dmaengine: sprd: Don't set chancnt
Posted by Baolin Wang 2 years, 11 months ago

On 3/14/2023 1:02 AM, Jisheng Zhang wrote:
> The dma framework will calculate the dma channels chancnt, setting it
> outself is wrong.
> 
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>

LGTM. Thanks.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

> ---
>   drivers/dma/sprd-dma.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> index 474d3ba8ec9f..2b639adb48ba 100644
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1169,7 +1169,6 @@ static int sprd_dma_probe(struct platform_device *pdev)
>   
>   	dma_cap_set(DMA_MEMCPY, sdev->dma_dev.cap_mask);
>   	sdev->total_chns = chn_count;
> -	sdev->dma_dev.chancnt = chn_count;
>   	INIT_LIST_HEAD(&sdev->dma_dev.channels);
>   	INIT_LIST_HEAD(&sdev->dma_dev.global_node);
>   	sdev->dma_dev.dev = &pdev->dev;