linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 0/4] tty: use true,false for bool variable
@ 2020-01-13  2:16 Zheng Bin
  2020-01-13  2:16 ` [PATCH RESEND 1/4] tty: synclink_gt: " Zheng Bin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Zheng Bin @ 2020-01-13  2:16 UTC (permalink / raw)
  To: gregkh, jslaby, linux-kernel; +Cc: zhengbin13

Use real name 'Zheng Bin', instead of zhengbin

Zheng Bin (4):
  tty: synclink_gt: use true,false for bool variable
  tty/serial: kgdb_nmi: use true,false for bool variable
  tty/serial: atmel: use true,false for bool variable
  tty/serial: 8250_exar: use true,false for bool variable

 drivers/tty/serial/8250/8250_exar.c | 6 +++---
 drivers/tty/serial/atmel_serial.c   | 6 +++---
 drivers/tty/serial/kgdb_nmi.c       | 4 ++--
 drivers/tty/synclink_gt.c           | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

--
2.7.4


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

* [PATCH RESEND 1/4] tty: synclink_gt: use true,false for bool variable
  2020-01-13  2:16 [PATCH RESEND 0/4] tty: use true,false for bool variable Zheng Bin
@ 2020-01-13  2:16 ` Zheng Bin
  2020-01-13  2:16 ` [PATCH RESEND 2/4] tty/serial: kgdb_nmi: " Zheng Bin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Zheng Bin @ 2020-01-13  2:16 UTC (permalink / raw)
  To: gregkh, jslaby, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/tty/synclink_gt.c:2101:3-19: 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/synclink_gt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c
index 5759b6c..eebf10b 100644
--- a/drivers/tty/synclink_gt.c
+++ b/drivers/tty/synclink_gt.c
@@ -2098,7 +2098,7 @@ static void isr_rxdata(struct slgt_info *info)
 		if (desc_complete(info->rbufs[i])) {
 			/* all buffers full */
 			rx_stop(info);
-			info->rx_restart = 1;
+			info->rx_restart = true;
 			continue;
 		}
 		info->rbufs[i].buf[count++] = (unsigned char)reg;
--
2.7.4


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

* [PATCH RESEND 2/4] tty/serial: kgdb_nmi: use true,false for bool variable
  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 ` Zheng Bin
  2020-01-13  2:16 ` [PATCH RESEND 3/4] tty/serial: atmel: " Zheng Bin
  2020-01-13  2:16 ` [PATCH RESEND 4/4] tty/serial: 8250_exar: " Zheng Bin
  3 siblings, 0 replies; 5+ messages in thread
From: Zheng Bin @ 2020-01-13  2:16 UTC (permalink / raw)
  To: gregkh, jslaby, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/tty/serial/kgdb_nmi.c:121:6-13: WARNING: Assignment of 0/1 to bool variable
drivers/tty/serial/kgdb_nmi.c:133:2-9: 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/kgdb_nmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index 4029272..5022447 100644
--- a/drivers/tty/serial/kgdb_nmi.c
+++ b/drivers/tty/serial/kgdb_nmi.c
@@ -118,7 +118,7 @@ static int kgdb_nmi_poll_one_knock(void)
 	int c = -1;
 	const char *magic = kgdb_nmi_magic;
 	size_t m = strlen(magic);
-	bool printch = 0;
+	bool printch = false;

 	c = dbg_io_ops->read_char();
 	if (c == NO_POLL_CHAR)
@@ -130,7 +130,7 @@ static int kgdb_nmi_poll_one_knock(void)
 		n = (n + 1) % m;
 		if (!n)
 			return 1;
-		printch = 1;
+		printch = true;
 	} else {
 		n = 0;
 	}
--
2.7.4


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

* [PATCH RESEND 3/4] tty/serial: atmel: use true,false for bool variable
  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 ` Zheng Bin
  2020-01-13  2:16 ` [PATCH RESEND 4/4] tty/serial: 8250_exar: " Zheng Bin
  3 siblings, 0 replies; 5+ messages in thread
From: Zheng Bin @ 2020-01-13  2:16 UTC (permalink / raw)
  To: gregkh, jslaby, linux-kernel; +Cc: zhengbin13

Fixes coccicheck warning:

drivers/tty/serial/atmel_serial.c:1062:1-23: WARNING: Assignment of 0/1 to bool variable
drivers/tty/serial/atmel_serial.c:1261:1-23: WARNING: Assignment of 0/1 to bool variable
drivers/tty/serial/atmel_serial.c:1688:3-25: 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/atmel_serial.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index fa19eb3..181da0c 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1059,7 +1059,7 @@ static int atmel_prepare_tx_dma(struct uart_port *port)

 chan_err:
 	dev_err(port->dev, "TX channel not available, switch to pio\n");
-	atmel_port->use_dma_tx = 0;
+	atmel_port->use_dma_tx = false;
 	if (atmel_port->chan_tx)
 		atmel_release_tx_dma(port);
 	return -EINVAL;
@@ -1258,7 +1258,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port)

 chan_err:
 	dev_err(port->dev, "RX channel not available, switch to pio\n");
-	atmel_port->use_dma_rx = 0;
+	atmel_port->use_dma_rx = false;
 	if (atmel_port->chan_rx)
 		atmel_release_rx_dma(port);
 	return -EINVAL;
@@ -1685,7 +1685,7 @@ static int atmel_prepare_rx_pdc(struct uart_port *port)
 					DMA_FROM_DEVICE);
 				kfree(atmel_port->pdc_rx[0].buf);
 			}
-			atmel_port->use_pdc_rx = 0;
+			atmel_port->use_pdc_rx = false;
 			return -ENOMEM;
 		}
 		pdc->dma_addr = dma_map_single(port->dev,
--
2.7.4


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

* [PATCH RESEND 4/4] tty/serial: 8250_exar: use true,false for bool variable
  2020-01-13  2:16 [PATCH RESEND 0/4] tty: use true,false for bool variable Zheng Bin
                   ` (2 preceding siblings ...)
  2020-01-13  2:16 ` [PATCH RESEND 3/4] tty/serial: atmel: " Zheng Bin
@ 2020-01-13  2:16 ` Zheng Bin
  3 siblings, 0 replies; 5+ messages in thread
From: Zheng Bin @ 2020-01-13  2:16 UTC (permalink / raw)
  To: gregkh, jslaby, linux-kernel; +Cc: zhengbin13

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


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

end of thread, other threads:[~2020-01-13  2:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH RESEND 4/4] tty/serial: 8250_exar: " Zheng Bin

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