aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorZheng Bin <zhengbin13@huawei.com>2020-01-13 10:16:17 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-14 14:34:04 +0100
commit67e977f32461f70c2b838d43107ff128f595485c (patch)
treea9b6a2580bf6471d7d3d1bf8932a47a92be26c43 /drivers/tty/serial/8250
parenttty/serial: atmel: use true,false for bool variable (diff)
downloadwireguard-linux-67e977f32461f70c2b838d43107ff128f595485c.tar.xz
wireguard-linux-67e977f32461f70c2b838d43107ff128f595485c.zip
tty/serial: 8250_exar: use true,false for bool variable
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> Link: https://lore.kernel.org/r/1578881777-65475-5-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_exar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index 108cd55f9c4d..91e9b070d36d 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);