Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: rockchip: Fix Wvoid-pointer-to-enum-cast warning

'version' is an enum, thus cast of pointer on 64-bit compile test with
W=1 causes:

rockchip_pdm.c:587:18: error: cast to smaller integer type 'enum rk_pdm_version' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230815143204.379708-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Mark Brown
49a4a8d1 5a180332

+1 -1
+1 -1
sound/soc/rockchip/rockchip_pdm.c
··· 584 584 585 585 match = of_match_device(rockchip_pdm_match, &pdev->dev); 586 586 if (match) 587 - pdm->version = (enum rk_pdm_version)match->data; 587 + pdm->version = (uintptr_t)match->data; 588 588 589 589 if (pdm->version == RK_PDM_RK3308) { 590 590 pdm->reset = devm_reset_control_get(&pdev->dev, "pdm-m");