linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: mxs-uart: fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10  8:50 Krzysztof Kozlowski
  2023-08-10 15:44 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10  8:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	linux-serial, linux-kernel, linux-arm-kernel
  Cc: Krzysztof Kozlowski, Andi Shyti

`devtype` is enum, thus cast of pointer on 64-bit compile test with W=1
causes:

  mxs-auart.c:1598:15: error: cast to smaller integer type 'enum mxs_auart_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Cc: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/tty/serial/mxs-auart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 8eeecf8ad359..a9b32722b049 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -1595,7 +1595,7 @@ static int mxs_auart_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	s->devtype = (enum mxs_auart_type)of_device_get_match_data(&pdev->dev);
+	s->devtype = (uintptr_t)of_device_get_match_data(&pdev->dev);
 
 	ret = mxs_get_clks(s, pdev);
 	if (ret)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-14 16:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10  8:50 [PATCH] serial: mxs-uart: fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-10 15:44 ` Greg Kroah-Hartman
2023-08-14  6:58   ` Krzysztof Kozlowski
2023-08-14 16:04     ` Greg Kroah-Hartman
2023-08-14 16:04     ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).