x86/mce/: Make cmci_supported() return bool
Subsystems (3)
PATCH 1/1 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.
--- arch/x86/kernel/cpu/mce/intel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/cpu/mce/intel.c +4 -4
@@ -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 );
Signature · 1 line
2.43.0
+Boris & Tony,
arch/x86/kernel/cpu/mce/intel.c
Quoted 19 lines
From: Nikolay Borisov <[email protected]>
Sent: Tuesday, December 17, 2024 10:51 PM
To: [email protected]
Cc: [email protected]; [email protected]; Nikolay Borisov <[email protected]>
Subject: [PATCH] x86/mce/: Makecmci_supported()return boolIt'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 <[email protected]>--- arch/x86/kernel/cpu/mce/intel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/x86/kernel/cpu/mce/intel.c +0
-0
Hi Nikolay,
I've included this change in the following link, which you've reviewed before 😊
https://lore.kernel.org/all/[email protected]/
Thanks!
-Qiuxu
Quoted 24 lines · Qiuxu
+Boris & Tony,
arch/x86/kernel/cpu/mce/intel.c
Quoted 19 lines
From: Nikolay Borisov <[email protected]>
Sent: Tuesday, December 17, 2024 10:51 PM
To: [email protected]
Cc: [email protected]; [email protected]; Nikolay Borisov <[email protected]>
Subject: [PATCH] x86/mce/: Makecmci_supported()return boolIt'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 <[email protected]>--- arch/x86/kernel/cpu/mce/intel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)arch/x86/kernel/cpu/mce/intel.c +0
-0Hi Nikolay,
Quoted 3 lines
I've included this change in the following link, which you've reviewed before 😊
https://lore.kernel.org/all/[email protected]/
Indeed,
Disregard this then :)
Quoted 3 lines
Thanks!
-Qiuxu
Quoted 36 lines
From: Nikolay Borisov <[email protected]>
Sent: Wednesday, December 18, 2024 5:04 PM
To: Zhuo, Qiuxu <[email protected]>; [email protected]; Borislav Petkov <[email protected]>; Luck, Tony <[email protected]>
Cc: [email protected]; [email protected]
Subject: Re: [PATCH] x86/mce/: Makecmci_supported()return boolQuoted 29 lines · Qiuxu
+Boris & Tony,
arch/x86/kernel/cpu/mce/intel.c
Quoted 20 lines
From: Nikolay Borisov <[email protected]>
Sent: Tuesday, December 17, 2024 10:51 PM
To: [email protected]
Cc: [email protected]; [email protected]; Nikolay Borisov <[email protected]>
Subject: [PATCH] x86/mce/: Makecmci_supported()return boolIt'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 <[email protected]>--- arch/x86/kernel/cpu/mce/intel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)(quoted diff) +0
-0
b/arch/x86/kernel/cpu/mce/intel.cindexb3cd2c61b11d..db0436e9c891100644arch/x86/kernel/cpu/mce/intel.c +0
-0Hi Nikolay,
I've included this change in the following link, which you've reviewed before 😊
Quoted 6 lines
Quoted 1 line
Indeed,
Disregard this then :)
Thanks Nikolay.
-Qiuxu