All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH 4/7] serial: zs: use NULL as a pointer, not 0
Date: Thu, 21 Apr 2022 12:17:05 +0200	[thread overview]
Message-ID: <20220421101708.5640-5-jslaby@suse.cz> (raw)
In-Reply-To: <20220421101708.5640-1-jslaby@suse.cz>

struct uart_port::membase is declared as a pointer. So it should be
initialized by NULL, not zero constant.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/serial/zs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/zs.c b/drivers/tty/serial/zs.c
index 70969bf9d82c..5bc58591665a 100644
--- a/drivers/tty/serial/zs.c
+++ b/drivers/tty/serial/zs.c
@@ -981,7 +981,7 @@ static const char *zs_type(struct uart_port *uport)
 static void zs_release_port(struct uart_port *uport)
 {
 	iounmap(uport->membase);
-	uport->membase = 0;
+	uport->membase = NULL;
 	release_mem_region(uport->mapbase, ZS_CHAN_IO_SIZE);
 }
 
-- 
2.36.0


  parent reply	other threads:[~2022-04-21 10:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 10:17 [PATCH 0/7] serial: various cleanups Jiri Slaby
2022-04-21 10:17 ` [PATCH 1/7] serial: sunplus-uart: mark sunplus_console_ports[] static Jiri Slaby
2022-04-21 10:17 ` [PATCH 2/7] serial: xilinx_uartps: return early in cdns_uart_handle_tx() Jiri Slaby
2022-04-21 10:17 ` [PATCH 3/7] serial: xilinx_uartps: cache xmit " Jiri Slaby
2022-04-21 10:17 ` Jiri Slaby [this message]
2022-04-21 10:17 ` [PATCH 5/7] serial: qcom: use check for empty instead of pending Jiri Slaby
2022-04-21 10:17 ` [PATCH 6/7] serial: pic32: make SERIAL_PIC32_CONSOLE depend on SERIAL_PIC32=y Jiri Slaby
2022-04-21 10:17 ` [PATCH 7/7] serial: allow COMPILE_TEST for some drivers Jiri Slaby
2023-03-30 19:28   ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220421101708.5640-5-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.