Skip to contentSkip to conversation

dmaengine: imx-dma: Cast of_device_get_match_data() with (uintptr_t)

PATCH Applied Fabio Estevam 2 participants 2 messages Jul 6, 2022 – Jul 21, 2022

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v2 1/1 dmaengine: imx-dma: Cast of_device_get_match_data() with (uintptr_t)

From: Fabio Estevam <[email protected]>

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]

Fixes 0ab785c894e6 ("dmaengine: imx-dma: Remove unused .id_table")

---
Changes since v1:
- Improve the Subject to describe the change and not the effect of the change. (Vinod)

 drivers/dma/imx-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/imx-dma.c +1 -1
index 3bffe3ecbd1b..65c6094ce063 100644
@@ -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);
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 4 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Applied, thanks

Signature · 1 line
~Vinod