Skip to contentSkip to conversation

serial: sifive: set pointer to NULL rather than 0.

PATCH In review Colin King 2 participants 2 messages Sep 25, 2021 – Oct 21, 2021

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 serial: sifive: set pointer to NULL rather than 0.

From: Colin Ian King <[email protected]>

Clean up the assignment of sifive_serial_console_ports[ssp->port.line], this is a pointer to a struct sifive_serial_port so the assignment should be a NULL rather than a integer 0.

---
 drivers/tty/serial/sifive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/sifive.c +1 -1
index 0ac0371f943b..b79900d0e91a 100644
@@ -887,7 +887,7 @@ static void __ssp_add_console_port(struct sifive_serial_port *ssp)
 
 static void __ssp_remove_console_port(struct sifive_serial_port *ssp)
 {
-	sifive_serial_console_ports[ssp->port.line] = 0;
+	sifive_serial_console_ports[ssp->port.line] = NULL;
 }
 
 #define SIFIVE_SERIAL_CONSOLE	(&sifive_serial_console)
Signature · 1 line
2.32.0
maintainer Reviewed-by Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · On Sat, 25 Sep 2021 15:47:26 PDT (-0700), [email protected] wrote:

From: Colin Ian King <[email protected]>

Clean up the assignment of sifive_serial_console_ports[ssp->port.line], this is a pointer to a struct sifive_serial_port so the assignment should be a NULL rather than a integer 0.

---
 drivers/tty/serial/sifive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/sifive.c +0 -0
index 0ac0371f943b..b79900d0e91a 100644

drivers/tty/serial/sifive.c static void __ssp_add_console_port(struct sifive_serial_port *ssp) · line 893

Quoted 8 lines
drivers/tty/serial/sifive.c +1 -1
@@ -887,7 +887,7 @@ static void __ssp_add_console_port(struct sifive_serial_port *ssp)
 
 static void __ssp_remove_console_port(struct sifive_serial_port *ssp)
 {
-	sifive_serial_console_ports[ssp->port.line] = 0;
+	sifive_serial_console_ports[ssp->port.line] = NULL;
 }
 
 #define SIFIVE_SERIAL_CONSOLE	(&sifive_serial_console)

I'm assuming this was aimed at the serial tree, but LMK if someone was expecting me to take it.