[PATCH -next] dmaengine: hidma: Fix cast to smaller integer type warning

DORMANTno replies

From: Yang Li <hidden>
Date: 2023-05-25 09:16:47
Also in: dmaengine, linux-arm-msm, lkml
Subsystem: arm/qualcomm mailing list, dma generic offload engine subsystem, qualcomm hidma driver, the rest · Maintainers: Vinod Koul, Sinan Kaya, Linus Torvalds

Fix the following warning:
drivers/dma/qcom/hidma.c:748:8: warning: cast to smaller integer type 'enum hidma_cap' from 'const void *'

Signed-off-by: Yang Li <redacted>
---
 drivers/dma/qcom/hidma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index 344525c3a32f..0165e2fa7be4 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -745,7 +745,7 @@ static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
 {
 	enum hidma_cap cap;
 
-	cap = (enum hidma_cap) device_get_match_data(dev);
+	cap = (unsigned long) device_get_match_data(dev);
 	return cap ? ((cap & test_cap) > 0) : 0;
 }
 
-- 
2.20.1.7.g153144c


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help