aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <[email protected]>2024-06-06 16:36:47 +0200
committerLee Jones <[email protected]>2024-07-04 17:38:40 +0100
commit105d4b4a36d8d5872da77d8c3e0855b86fcc6c8c (patch)
treee50126b7f6e3dcc91b5b9f92ee99ec1e02a9e4d1
parent81c8920d46d449bec93c20b5083365a7cf2561aa (diff)
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]>
-rw-r--r--drivers/mfd/mxs-lradc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/mxs-lradc.c b/drivers/mfd/mxs-lradc.c
index 73893890b50a..b2ebb5433121 100644
--- a/drivers/mfd/mxs-lradc.c
+++ b/drivers/mfd/mxs-lradc.c
@@ -137,7 +137,7 @@ static int mxs_lradc_probe(struct platform_device *pdev)
if (!lradc)
return -ENOMEM;
- lradc->soc = (enum mxs_lradc_id)device_get_match_data(&pdev->dev);
+ lradc->soc = (kernel_ulong_t)device_get_match_data(&pdev->dev);
lradc->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(lradc->clk)) {