linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zheng Bin <zhengbin13@huawei.com>
To: <gregkh@linuxfoundation.org>, <jslaby@suse.com>,
	<linux-kernel@vger.kernel.org>
Cc: <zhengbin13@huawei.com>
Subject: [PATCH RESEND 4/4] tty/serial: 8250_exar: use true,false for bool variable
Date: Mon, 13 Jan 2020 10:16:17 +0800	[thread overview]
Message-ID: <1578881777-65475-5-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1578881777-65475-1-git-send-email-zhengbin13@huawei.com>

Fixes coccicheck warning:

drivers/tty/serial/8250/8250_exar.c:189:6-17: WARNING: Assignment of 0/1 to bool variable
drivers/tty/serial/8250/8250_exar.c:197:3-14: WARNING: Assignment of 0/1 to bool variable
drivers/tty/serial/8250/8250_exar.c:199:3-14: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
---
 drivers/tty/serial/8250/8250_exar.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 108cd55..91e9b07 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -186,7 +186,7 @@ static int xr17v35x_startup(struct uart_port *port)
 static void exar_shutdown(struct uart_port *port)
 {
 	unsigned char lsr;
-	bool tx_complete = 0;
+	bool tx_complete = false;
 	struct uart_8250_port *up = up_to_u8250p(port);
 	struct circ_buf *xmit = &port->state->xmit;
 	int i = 0;
@@ -194,9 +194,9 @@ static void exar_shutdown(struct uart_port *port)
 	do {
 		lsr = serial_in(up, UART_LSR);
 		if (lsr & (UART_LSR_TEMT | UART_LSR_THRE))
-			tx_complete = 1;
+			tx_complete = true;
 		else
-			tx_complete = 0;
+			tx_complete = false;
 		usleep_range(1000, 1100);
 	} while (!uart_circ_empty(xmit) && !tx_complete && i++ < 1000);

--
2.7.4


      parent reply	other threads:[~2020-01-13  2:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13  2:16 [PATCH RESEND 0/4] tty: use true,false for bool variable Zheng Bin
2020-01-13  2:16 ` [PATCH RESEND 1/4] tty: synclink_gt: " Zheng Bin
2020-01-13  2:16 ` [PATCH RESEND 2/4] tty/serial: kgdb_nmi: " Zheng Bin
2020-01-13  2:16 ` [PATCH RESEND 3/4] tty/serial: atmel: " Zheng Bin
2020-01-13  2:16 ` Zheng Bin [this message]

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=1578881777-65475-5-git-send-email-zhengbin13@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@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 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).