Commit 094f9ee5 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Vinod Koul

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810100000.123515-2-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 9a2136b6
......@@ -644,7 +644,7 @@ static int mmp_tdma_probe(struct platform_device *pdev)
of_id = of_match_device(mmp_tdma_dt_ids, &pdev->dev);
if (of_id)
type = (enum mmp_tdma_type) of_id->data;
type = (uintptr_t) of_id->data;
else
type = platform_get_device_id(pdev)->driver_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment