rtc: mxc: Silence a clang warning
Subsystems (2)
Fabio Estevam
reviewerPATCH 1/1 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 ba7aa63000f2 ("rtc: mxc: use of_device_get_match_data")
Signed-off-by Fabio Estevam <[email protected]>
--- drivers/rtc/rtc-mxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/rtc-mxc.c +1 -1
@@ -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))
Signature · 1 line
2.25.1
Quoted 6 lines · Fabio Estevam
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 'enumimx_rtc_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
Applied, thanks!
[1/1] rtc: mxc: Silence a clang warning
commit: f78e3d407a339ffdd2620140300f821ea41118f4
Best regards,
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com