[PATCH 2/2] dmaengine: mmp: fix Wvoid-pointer-to-enum-cast warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:

  mmp_tdma.c:649:10: error: cast to smaller integer type 'enum mmp_tdma_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
---
 drivers/dma/mmp_tdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index d49fa6bc6775..52b726fc5f04 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -646,7 +646,7 @@ static int mmp_tdma_probe(struct platform_device *pdev)
 
 	of_id = of_match_device(mmp_tdma_dt_ids, &pdev->dev);
 	if (of_id)
-		type = (enum mmp_tdma_type) of_id->data;
+		type = (uintptr_t) of_id->data;
 	else
 		type = platform_get_device_id(pdev)->driver_data;
 
-- 
2.34.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux