Skip to contentSkip to conversation

serial: imx: Fix build warning when CONFIG_LPAE=y

PATCH In review Fabio Estevam 2 participants 2 messages Sep 20, 2013

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 serial: imx: Fix build warning when CONFIG_LPAE=y

From: Fabio Estevam <[email protected]>

Building multi_v7_defconfig with CONFIG_LPAE=y leads to the following build warning:

drivers/tty/serial/imx.c: In function 'imx_verify_port':
drivers/tty/serial/imx.c:1542:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Fix the casting to get rid of the warning.

---
 drivers/tty/serial/imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/imx.c +1 -1
index a0ebbc9..dd5e583 100644
@@ -1539,7 +1539,7 @@ imx_verify_port(struct uart_port *port, struct serial_struct *ser)
 		ret = -EINVAL;
 	if (sport->port.uartclk / 16 != ser->baud_base)
 		ret = -EINVAL;
-	if ((void *)sport->port.mapbase != ser->iomem_base)
+	if (sport->port.mapbase != (unsigned long)ser->iomem_base)
 		ret = -EINVAL;
 	if (sport->port.iobase != ser->port)
 		ret = -EINVAL;
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 5 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Building multi_v7_defconfig with CONFIG_LPAE=y leads to the following build warning:

Quoted 8 lines

drivers/tty/serial/imx.c: In function 'imx_verify_port':
drivers/tty/serial/imx.c:1542:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Fix the casting to get rid of the warning.

Already fixed by:

http://marc.info/?l=linux-kernel&m=137896012701204&w=2

(But sitting in Greg's queue due to the merge window).

-Olof