Skip to content

Commit 9a2136b

Browse files
krzkvinodkoul
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 88ba976 commit 9a2136b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/qcom/hidma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
745745
{
746746
enum hidma_cap cap;
747747

748-
cap = (enum hidma_cap) device_get_match_data(dev);
748+
cap = (uintptr_t) device_get_match_data(dev);
749749
return cap ? ((cap & test_cap) > 0) : 0;
750750
}
751751

0 commit comments

Comments
 (0)