Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwpoison: remove unused global variable in do_machine_check()

Remove an unused global variable mce_entry and relative operations in
do_machine_check().

Signed-off-by: Chen Yucong <slaoub@gmail.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Chen Yucong and committed by
Linus Torvalds
65eb7182 be976572

-7
-2
arch/x86/include/asm/mce.h
··· 176 176 DECLARE_PER_CPU(unsigned, mce_exception_count); 177 177 DECLARE_PER_CPU(unsigned, mce_poll_count); 178 178 179 - extern atomic_t mce_entry; 180 - 181 179 typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS); 182 180 DECLARE_PER_CPU(mce_banks_t, mce_poll_banks); 183 181
-5
arch/x86/kernel/cpu/mcheck/mce.c
··· 60 60 61 61 #define SPINUNIT 100 /* 100ns */ 62 62 63 - atomic_t mce_entry; 64 - 65 63 DEFINE_PER_CPU(unsigned, mce_exception_count); 66 64 67 65 struct mce_bank *mce_banks __read_mostly; ··· 1038 1040 DECLARE_BITMAP(valid_banks, MAX_NR_BANKS); 1039 1041 char *msg = "Unknown"; 1040 1042 1041 - atomic_inc(&mce_entry); 1042 - 1043 1043 this_cpu_inc(mce_exception_count); 1044 1044 1045 1045 if (!cfg->banks) ··· 1167 1171 mce_report_event(regs); 1168 1172 mce_wrmsrl(MSR_IA32_MCG_STATUS, 0); 1169 1173 out: 1170 - atomic_dec(&mce_entry); 1171 1174 sync_core(); 1172 1175 } 1173 1176 EXPORT_SYMBOL_GPL(do_machine_check);