All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10  9:59 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  9:59 UTC (permalink / raw)
  To: Vinod Koul, Sinan Kaya, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, dmaengine, linux-kernel, linux-arm-kernel,
	linux-arm-msm
  Cc: Andi Shyti, Krzysztof Kozlowski

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

  hidma.c:748:8: error: cast to smaller integer type 'enum hidma_cap' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 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 b5e3633e6a5e..499df3c83976 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 = (uintptr_t) device_get_match_data(dev);
 	return cap ? ((cap & test_cap) > 0) : 0;
 }
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-10-04 14:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10  9:59 [PATCH 1/2] dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10  9:59 ` Krzysztof Kozlowski
2023-08-10 10:00 ` [PATCH 2/2] dmaengine: mmp: " Krzysztof Kozlowski
2023-08-10 10:00   ` Krzysztof Kozlowski
2023-10-04 14:29 ` [PATCH 1/2] dmaengine: qcom: " Vinod Koul
2023-10-04 14:29   ` 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.