Skip to content

Commit

Permalink
rtc: mxc: Silence a clang warning
Browse files Browse the repository at this point in the history
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 <lkp@intel.com>
Fixes: ba7aa63 ("rtc: mxc: use of_device_get_match_data")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220526011459.1167197-1-festevam@gmail.com
  • Loading branch information
fabioestevam authored and alexandrebelloni committed Jun 1, 2022
1 parent 3f34892 commit f78e3d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-mxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
if (!pdata)
return -ENOMEM;

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

pdata->ioaddr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pdata->ioaddr))
Expand Down

0 comments on commit f78e3d4

Please sign in to comment.