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.

mfd: mxs-lradc: Fix Wvoid-pointer-to-enum-cast warning (again)

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

mxs-lradc.c:140:15: error: cast to smaller integer type 'enum mxs_lradc_id' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Year ago this was solved, although LKML discussion suggested warning is
not suitable for kernel. Nothing changed in this regard for a year, so
assume the warning will stay and we want to have warnings-free builds.

Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/
Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240606143648.152668-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
105d4b4a 81c8920d

+1 -1
+1 -1
drivers/mfd/mxs-lradc.c
··· 137 137 if (!lradc) 138 138 return -ENOMEM; 139 139 140 - lradc->soc = (enum mxs_lradc_id)device_get_match_data(&pdev->dev); 140 + lradc->soc = (kernel_ulong_t)device_get_match_data(&pdev->dev); 141 141 142 142 lradc->clk = devm_clk_get(&pdev->dev, NULL); 143 143 if (IS_ERR(lradc->clk)) {