The following commit has been merged into the ras/core branch of tip: Commit-ID: cd5e0d1fc93a2218fbfb2b614f06e04e218ca948 Gitweb: https://git.kernel.org/tip/cd5e0d1fc93a2218fbfb2b614f06e04e218ca948 Author: Borislav Petkov <bp@xxxxxxx> AuthorDate: Mon, 01 Nov 2021 15:34:48 +01:00 Committer: Borislav Petkov <bp@xxxxxxx> CommitterDate: Mon, 13 Dec 2021 14:11:22 +01:00 x86/mce: Do not use memset to clear the banks bitmaps The bitmap is a single unsigned long so no need for the function call. No functional changes. Signed-off-by: Borislav Petkov <bp@xxxxxxx> Link: https://lore.kernel.org/r/20211208111343.8130-2-bp@xxxxxxxxx --- arch/x86/kernel/cpu/mce/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index 30de00f..7c264ee 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -1336,8 +1336,8 @@ static noinstr void unexpected_machine_check(struct pt_regs *regs) noinstr void do_machine_check(struct pt_regs *regs) { int worst = 0, order, no_way_out, kill_current_task, lmce; - DECLARE_BITMAP(valid_banks, MAX_NR_BANKS); - DECLARE_BITMAP(toclear, MAX_NR_BANKS); + DECLARE_BITMAP(valid_banks, MAX_NR_BANKS) = { 0 }; + DECLARE_BITMAP(toclear, MAX_NR_BANKS) = { 0 }; struct mca_config *cfg = &mca_cfg; struct mce m, *final; char *msg = NULL; @@ -1381,7 +1381,6 @@ noinstr void do_machine_check(struct pt_regs *regs) final = this_cpu_ptr(&mces_seen); *final = m; - memset(valid_banks, 0, sizeof(valid_banks)); no_way_out = mce_no_way_out(&m, &msg, valid_banks, regs); barrier();
![]() |