summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/kgdb_nmi.c
diff options
context:
space:
mode:
authorZheng Bin <zhengbin13@huawei.com>2020-01-13 03:16:15 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-14 14:34:04 +0100
commita4282b8670c57f6fe9a900b32b6eaaaa219dff08 (patch)
tree9132df1a9de68e96df3e59f63693a33da27f331d /drivers/tty/serial/kgdb_nmi.c
parenttty: synclink_gt: use true,false for bool variable (diff)
downloadlinux-a4282b8670c57f6fe9a900b32b6eaaaa219dff08.tar.xz
linux-a4282b8670c57f6fe9a900b32b6eaaaa219dff08.zip
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 <hulkci@huawei.com> Signed-off-by: Zheng Bin <zhengbin13@huawei.com> Link: https://lore.kernel.org/r/1578881777-65475-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/kgdb_nmi.c')
-rw-r--r--drivers/tty/serial/kgdb_nmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index 4029272891f9..5022447afa23 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;
}