Skip to contentSkip to conversation

dmaengine: hidma: Fix cast to smaller integer type warning

PATCH New Yang Li 1 participant 1 message May 25, 2023

Subsystems (3)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 dmaengine: hidma: Fix cast to smaller integer type warning

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

---
 drivers/dma/qcom/hidma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/qcom/hidma.c +1 -1
index 344525c3a32f..0165e2fa7be4 100644
@@ -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;
 }
 
Signature · 1 line
2.20.1.7.g153144c