* [PATCH] rtc: mxc: Silence a clang warning
@ 2022-05-26 1:14 Fabio Estevam
2022-06-01 21:20 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2022-05-26 1:14 UTC (permalink / raw)
To: alexandre.belloni; +Cc: nathan, linux-rtc, Fabio Estevam, kernel test robot
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: ba7aa63000f2 ("rtc: mxc: use of_device_get_match_data")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
drivers/rtc/rtc-mxc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index 0f08f22df869..53d4e253e81f 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -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))
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: mxc: Silence a clang warning
2022-05-26 1:14 [PATCH] rtc: mxc: Silence a clang warning Fabio Estevam
@ 2022-06-01 21:20 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2022-06-01 21:20 UTC (permalink / raw)
To: Fabio Estevam; +Cc: kernel test robot, linux-rtc, nathan
On Wed, 25 May 2022 22:14:59 -0300, Fabio Estevam wrote:
> 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]
>
>
Applied, thanks!
[1/1] rtc: mxc: Silence a clang warning
commit: f78e3d407a339ffdd2620140300f821ea41118f4
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-01 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-26 1:14 [PATCH] rtc: mxc: Silence a clang warning Fabio Estevam
2022-06-01 21:20 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox