2020-01-13 02:11:15

by Zheng Bin

[permalink] [raw]
Subject: [PATCH RESEND 0/4] tty: use true,false for bool variable

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


2020-01-13 02:11:57

by Zheng Bin

[permalink] [raw]
Subject: [PATCH RESEND 2/4] tty/serial: kgdb_nmi: use true,false for bool variable

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 <[email protected]>
Signed-off-by: Zheng Bin <[email protected]>
---
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

2020-01-13 02:12:23

by Zheng Bin

[permalink] [raw]
Subject: [PATCH RESEND 1/4] tty: synclink_gt: use true,false for bool variable

Fixes coccicheck warning:

drivers/tty/synclink_gt.c:2101:3-19: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zheng Bin <[email protected]>
---
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