Skip to content

Commit 105d4b4

Browse files
krzklag-linaro
authored andcommitted
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/[email protected]/ Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 81c8920 commit 105d4b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mfd/mxs-lradc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static int mxs_lradc_probe(struct platform_device *pdev)
137137
if (!lradc)
138138
return -ENOMEM;
139139

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);
141141

142142
lradc->clk = devm_clk_get(&pdev->dev, NULL);
143143
if (IS_ERR(lradc->clk)) {

0 commit comments

Comments
 (0)