Skip to content

Commit f78e3d4

Browse files
fabioestevamalexandrebelloni
authored andcommitted
rtc: mxc: Silence a clang warning
Change the of_device_get_match_data() cast to (uintptr_t) to silence the following clang warning: drivers/rtc/rtc-mxc.c:315:19: warning: cast to smaller integer type 'enum imx_rtc_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] Reported-by: kernel test robot <[email protected]> Fixes: ba7aa63 ("rtc: mxc: use of_device_get_match_data") Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3f34892 commit f78e3d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-mxc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
311311
if (!pdata)
312312
return -ENOMEM;
313313

314-
pdata->devtype = (enum imx_rtc_type)of_device_get_match_data(&pdev->dev);
314+
pdata->devtype = (uintptr_t)of_device_get_match_data(&pdev->dev);
315315

316316
pdata->ioaddr = devm_platform_ioremap_resource(pdev, 0);
317317
if (IS_ERR(pdata->ioaddr))

0 commit comments

Comments
 (0)