All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: imx-dma: Silence a clang warning
@ 2022-05-26  0:54 Fabio Estevam
  2022-07-06  5:35 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2022-05-26  0:54 UTC (permalink / raw)
  To: vkoul; +Cc: nathan, dmaengine, Fabio Estevam, kernel test robot

Change the of_device_get_match_data() cast to (uintptr_t)
to silence the following clang warning:

drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 0ab785c894e6 ("dmaengine: imx-dma: Remove unused .id_table")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/dma/imx-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 3bffe3ecbd1b..65c6094ce063 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -1047,7 +1047,7 @@ static int __init imxdma_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	imxdma->dev = &pdev->dev;
-	imxdma->devtype = (enum imx_dma_type)of_device_get_match_data(&pdev->dev);
+	imxdma->devtype = (uintptr_t)of_device_get_match_data(&pdev->dev);
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	imxdma->base = devm_ioremap_resource(&pdev->dev, res);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: imx-dma: Silence a clang warning
  2022-05-26  0:54 [PATCH] dmaengine: imx-dma: Silence a clang warning Fabio Estevam
@ 2022-07-06  5:35 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-07-06  5:35 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: nathan, dmaengine, kernel test robot

On 25-05-22, 21:54, Fabio Estevam wrote:
> Change the of_device_get_match_data() cast to (uintptr_t)
> to silence the following clang warning:

Patch title should describe the change and not the effect of the change.
Pls revise

> 
> drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 0ab785c894e6 ("dmaengine: imx-dma: Remove unused .id_table")
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
>  drivers/dma/imx-dma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
> index 3bffe3ecbd1b..65c6094ce063 100644
> --- a/drivers/dma/imx-dma.c
> +++ b/drivers/dma/imx-dma.c
> @@ -1047,7 +1047,7 @@ static int __init imxdma_probe(struct platform_device *pdev)
>  		return -ENOMEM;
>  
>  	imxdma->dev = &pdev->dev;
> -	imxdma->devtype = (enum imx_dma_type)of_device_get_match_data(&pdev->dev);
> +	imxdma->devtype = (uintptr_t)of_device_get_match_data(&pdev->dev);
>  
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	imxdma->base = devm_ioremap_resource(&pdev->dev, res);
> -- 
> 2.25.1

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-06  5:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-26  0:54 [PATCH] dmaengine: imx-dma: Silence a clang warning Fabio Estevam
2022-07-06  5:35 ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.