Commit a4282b86 authored by Zheng Bin's avatar Zheng Bin Committed by Greg Kroah-Hartman

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZheng Bin <zhengbin13@huawei.com>
Link: https://lore.kernel.org/r/1578881777-65475-3-git-send-email-zhengbin13@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bf22182c
...@@ -118,7 +118,7 @@ static int kgdb_nmi_poll_one_knock(void) ...@@ -118,7 +118,7 @@ static int kgdb_nmi_poll_one_knock(void)
int c = -1; int c = -1;
const char *magic = kgdb_nmi_magic; const char *magic = kgdb_nmi_magic;
size_t m = strlen(magic); size_t m = strlen(magic);
bool printch = 0; bool printch = false;
c = dbg_io_ops->read_char(); c = dbg_io_ops->read_char();
if (c == NO_POLL_CHAR) if (c == NO_POLL_CHAR)
...@@ -130,7 +130,7 @@ static int kgdb_nmi_poll_one_knock(void) ...@@ -130,7 +130,7 @@ static int kgdb_nmi_poll_one_knock(void)
n = (n + 1) % m; n = (n + 1) % m;
if (!n) if (!n)
return 1; return 1;
printch = 1; printch = true;
} else { } else {
n = 0; n = 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment