Skip to content

Commit 094f9ee

Browse files
krzkvinodkoul
authored andcommitted
dmaengine: mmp: fix Wvoid-pointer-to-enum-cast warning
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: mmp_tdma.c:649:10: error: cast to smaller integer type 'enum mmp_tdma_type' 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 9a2136b commit 094f9ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/dma/mmp_tdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ static int mmp_tdma_probe(struct platform_device *pdev)
644644

645645
of_id = of_match_device(mmp_tdma_dt_ids, &pdev->dev);
646646
if (of_id)
647-
type = (enum mmp_tdma_type) of_id->data;
647+
type = (uintptr_t) of_id->data;
648648
else
649649
type = platform_get_device_id(pdev)->driver_data;
650650

0 commit comments

Comments
 (0)