Skip to content

Commit a0b1589

Browse files
krzkvinodkoul
authored andcommitted
dmaengine: mmp: Fix again Wvoid-pointer-to-enum-cast warning
This was fixed and re-introduced. 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: mmp_tdma.c:644:9: error: cast to smaller integer type 'enum mmp_tdma_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Fixes: a67ba97 ("dmaengine: Use device_get_match_data()") Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 85a4ca2 commit a0b1589

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
@@ -641,7 +641,7 @@ static int mmp_tdma_probe(struct platform_device *pdev)
641641
int chan_num = TDMA_CHANNEL_NUM;
642642
struct gen_pool *pool = NULL;
643643

644-
type = (enum mmp_tdma_type)device_get_match_data(&pdev->dev);
644+
type = (kernel_ulong_t)device_get_match_data(&pdev->dev);
645645

646646
/* always have couple channels */
647647
tdev = devm_kzalloc(&pdev->dev, sizeof(*tdev), GFP_KERNEL);

0 commit comments

Comments
 (0)