kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: sifive: set pointer to NULL rather than 0.
@ 2021-09-25 22:47 Colin King
  2021-10-21 21:51 ` Palmer Dabbelt
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-09-25 22:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Palmer Dabbelt, Paul Walmsley,
	linux-serial, linux-riscv
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

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.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/tty/serial/sifive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
index 0ac0371f943b..b79900d0e91a 100644
--- a/drivers/tty/serial/sifive.c
+++ b/drivers/tty/serial/sifive.c
@@ -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)
-- 
2.32.0


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

* Re: [PATCH] serial: sifive: set pointer to NULL rather than 0.
  2021-09-25 22:47 [PATCH] serial: sifive: set pointer to NULL rather than 0 Colin King
@ 2021-10-21 21:51 ` Palmer Dabbelt
  0 siblings, 0 replies; 2+ messages in thread
From: Palmer Dabbelt @ 2021-10-21 21:51 UTC (permalink / raw)
  To: colin.king
  Cc: Greg KH, jirislaby, Paul Walmsley, linux-serial, linux-riscv,
	kernel-janitors, linux-kernel

On Sat, 25 Sep 2021 15:47:26 PDT (-0700), colin.king@canonical.com wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/tty/serial/sifive.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
> index 0ac0371f943b..b79900d0e91a 100644
> --- a/drivers/tty/serial/sifive.c
> +++ b/drivers/tty/serial/sifive.c
> @@ -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.

Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>

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

end of thread, other threads:[~2021-10-21 21:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-25 22:47 [PATCH] serial: sifive: set pointer to NULL rather than 0 Colin King
2021-10-21 21:51 ` Palmer Dabbelt

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).