Skip to contentSkip to conversation

serial: imx: Use NULL as the last argument of add_preferred_console()

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

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/1 serial: imx: Use NULL as the last argument of add_preferred_console()

From: Fabio Estevam <[email protected]>

Commit f7d2c0bbd (serial: i.MX: evaluate linux,stdout-path property) introduced the following sparse warning:

drivers/tty/serial/imx.c:1916:77: warning: Using plain integer as NULL pointer

Pass NULL as the last argument of add_preferred_console() instead of zero.

---
 drivers/tty/serial/imx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/imx.c +2 -1
index 2c13155..9a66dc5 100644
@@ -1913,7 +1913,8 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 	sport->devdata = of_id->data;
 
 	if (of_device_is_stdout_path(np))
-		add_preferred_console(imx_reg.cons->name, sport->port.line, 0);
+		add_preferred_console(imx_reg.cons->name, sport->port.line,
+				      NULL);
 
 	return 0;
 }
Signature · 1 line
1.8.1.2
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Commit f7d2c0bbd (serial: i.MX: evaluate linux,stdout-path property) introduced the following sparse warning:

drivers/tty/serial/imx.c:1916:77: warning: Using plain integer as NULL pointer

Pass NULL as the last argument of add_preferred_console() instead of zero.

Sascha

Quoted 22 lines
---
 drivers/tty/serial/imx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/imx.c +2 -1
index 2c13155..9a66dc5 100644
@@ -1913,7 +1913,8 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 	sport->devdata = of_id->data;
 
 	if (of_device_is_stdout_path(np))
-		add_preferred_console(imx_reg.cons->name, sport->port.line, 0);
+		add_preferred_console(imx_reg.cons->name, sport->port.line,
+				      NULL);
 
 	return 0;
 }
Signature · 1 line
1.8.1.2
Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |