[PATCH] dmaengine: mediatek: mtk-hsdma: use NULL instead of using plain integer as pointer

Haowen Bai posted 1 patch 2 years, 5 months ago
drivers/dma/mediatek/mtk-hsdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] dmaengine: mediatek: mtk-hsdma: use NULL instead of using plain integer as pointer
Posted by Haowen Bai 2 years, 5 months ago
This fixes the following sparse warnings:
drivers/dma/mediatek/mtk-hsdma.c:604:26: warning: Using plain integer
as NULL pointer

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/dma/mediatek/mtk-hsdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c
index 6ad8afbb95f2..358894e72fba 100644
--- a/drivers/dma/mediatek/mtk-hsdma.c
+++ b/drivers/dma/mediatek/mtk-hsdma.c
@@ -601,7 +601,7 @@ static void mtk_hsdma_free_rooms_in_ring(struct mtk_hsdma_device *hsdma)
 			cb->flag = 0;
 		}
 
-		cb->vd = 0;
+		cb->vd = NULL;
 
 		/*
 		 * Recycle the RXD with the helper WRITE_ONCE that can ensure
-- 
2.7.4
Re: [PATCH] dmaengine: mediatek: mtk-hsdma: use NULL instead of using plain integer as pointer
Posted by Vinod Koul 2 years, 5 months ago
On 12-04-22, 15:59, Haowen Bai wrote:
> This fixes the following sparse warnings:
> drivers/dma/mediatek/mtk-hsdma.c:604:26: warning: Using plain integer
> as NULL pointer

Applied, thanks

> 
> Signed-off-by: Haowen Bai <baihaowen@meizu.com>
> ---
>  drivers/dma/mediatek/mtk-hsdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/mediatek/mtk-hsdma.c b/drivers/dma/mediatek/mtk-hsdma.c
> index 6ad8afbb95f2..358894e72fba 100644
> --- a/drivers/dma/mediatek/mtk-hsdma.c
> +++ b/drivers/dma/mediatek/mtk-hsdma.c
> @@ -601,7 +601,7 @@ static void mtk_hsdma_free_rooms_in_ring(struct mtk_hsdma_device *hsdma)
>  			cb->flag = 0;
>  		}
>  
> -		cb->vd = 0;
> +		cb->vd = NULL;
>  
>  		/*
>  		 * Recycle the RXD with the helper WRITE_ONCE that can ensure
> -- 
> 2.7.4

-- 
~Vinod