From: Krzysztof Kozlowski Date: Thu, 10 Aug 2023 09:59:59 +0000 (+0200) Subject: dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning X-Git-Tag: v6.7-rc1~73^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a2136b60cc1a5ba9c5878f08a41f41271c4cd17;p=thirdparty%2Fkernel%2Flinux.git dmaengine: qcom: fix Wvoid-pointer-to-enum-cast warning '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 Link: https://lore.kernel.org/r/20230810100000.123515-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index f4659553945b6..d63b93dc70476 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; }