[tip: ras/core] x86/mce: Assign boolean values to a bool variable

From: tip-bot2 for Kaixu Xia
Date: Fri Nov 06 2020 - 06:01:51 EST


The following commit has been merged into the ras/core branch of tip:

Commit-ID: 77080929d56d87a57093869a15d2785b8b2d8cd5
Gitweb: https://git.kernel.org/tip/77080929d56d87a57093869a15d2785b8b2d8cd5
Author: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
AuthorDate: Fri, 06 Nov 2020 17:19:23 +08:00
Committer: Borislav Petkov <bp@xxxxxxx>
CommitterDate: Fri, 06 Nov 2020 11:51:04 +01:00

x86/mce: Assign boolean values to a bool variable

Fix the following coccinelle warnings:

./arch/x86/kernel/cpu/mce/core.c:1765:3-20: WARNING: Assignment of 0/1 to bool variable
./arch/x86/kernel/cpu/mce/core.c:1584:2-9: WARNING: Assignment of 0/1 to bool variable

[ bp: Massage commit message. ]

Reported-by: Tosk Robot <tencent_os_robot@xxxxxxxxxxx>
Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
Signed-off-by: Borislav Petkov <bp@xxxxxxx>
Link: https://lkml.kernel.org/r/1604654363-1463-1-git-send-email-kaixuxia@xxxxxxxxxxx
---
arch/x86/kernel/cpu/mce/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index 51bf910..888248a 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -1581,7 +1581,7 @@ static void __mcheck_cpu_mce_banks_init(void)
* __mcheck_cpu_init_clear_banks() does the final bank setup.
*/
b->ctl = -1ULL;
- b->init = 1;
+ b->init = true;
}
}

@@ -1762,7 +1762,7 @@ static int __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
*/

if (c->x86 == 6 && c->x86_model < 0x1A && this_cpu_read(mce_num_banks) > 0)
- mce_banks[0].init = 0;
+ mce_banks[0].init = false;

/*
* All newer Intel systems support MCE broadcasting. Enable