Message ID | 20241217145117.155990-1-nik.borisov@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | x86/mce/: Make cmci_supported() return bool | expand |
+Boris & Tony, > From: Nikolay Borisov <nik.borisov@suse.com> > Sent: Tuesday, December 17, 2024 10:51 PM > To: dave.hansen@linux.intel.com > Cc: x86@kernel.org; linux-edac@vger.kernel.org; Nikolay Borisov > <nik.borisov@suse.com> > Subject: [PATCH] x86/mce/: Make cmci_supported() return bool > > It's the last function in this file which is not returning bool when it should. > Rectify this, no functional changes. > > Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> > --- > arch/x86/kernel/cpu/mce/intel.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c > index b3cd2c61b11d..db0436e9c891 100644 > --- a/arch/x86/kernel/cpu/mce/intel.c > +++ b/arch/x86/kernel/cpu/mce/intel.c Hi Nikolay, I've included this change in the following link, which you've reviewed before
diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c index b3cd2c61b11d..db0436e9c891 100644 --- a/arch/x86/kernel/cpu/mce/intel.c +++ b/arch/x86/kernel/cpu/mce/intel.c @@ -75,12 +75,12 @@ static u16 cmci_threshold[MAX_NR_BANKS]; */ #define CMCI_STORM_THRESHOLD 32749 -static int cmci_supported(int *banks) +static bool cmci_supported(int *banks) { u64 cap; if (mca_cfg.cmci_disabled || mca_cfg.ignore_ce) - return 0; + return false; /* * Vendor check is not strictly needed, but the initial @@ -89,10 +89,10 @@ static int cmci_supported(int *banks) */ if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL && boot_cpu_data.x86_vendor != X86_VENDOR_ZHAOXIN) - return 0; + return false; if (!boot_cpu_has(X86_FEATURE_APIC) || lapic_get_maxlvt() < 6) - return 0; + return false; rdmsrl(MSR_IA32_MCG_CAP, cap); *banks = min_t(unsigned, MAX_NR_BANKS, cap & MCG_BANKCNT_MASK); return !!(cap & MCG_CMCI_P);
It's the last function in this file which is not returning bool when it should. Rectify this, no functional changes. Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> --- arch/x86/kernel/cpu/mce/intel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)