diff mbox series

[v4,6/8] x86/mce: Remove the unnecessary {}

Message ID 20241111060428.44258-7-qiuxu.zhuo@intel.com (mailing list archive)
State New
Headers show
Series x86/mce: Clean up some x86/mce code | expand

Commit Message

Zhuo, Qiuxu Nov. 11, 2024, 6:04 a.m. UTC
Remove the unnecessary {} from the case statement.

Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
---
Changes in v4:
  - No changes.

Changes in v3:
  - Collect "Reviewed-by:" from Nikolay & Sohil.

Changes in v2:
  - Collect "Reviewed-by:" from Tony.

 arch/x86/kernel/cpu/mce/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Yazen Ghannam Nov. 12, 2024, 3:43 p.m. UTC | #1
On Mon, Nov 11, 2024 at 02:04:26PM +0800, Qiuxu Zhuo wrote:
> Remove the unnecessary {} from the case statement.
> 
> Reviewed-by: Tony Luck <tony.luck@intel.com>
> Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
> Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
> Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>

Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>

But please see note below.

> ---
> Changes in v4:
>   - No changes.
> 
> Changes in v3:
>   - Collect "Reviewed-by:" from Nikolay & Sohil.
> 
> Changes in v2:
>   - Collect "Reviewed-by:" from Tony.
> 
>  arch/x86/kernel/cpu/mce/core.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
> index d288cc7390f6..0f0c6e9d9183 100644
> --- a/arch/x86/kernel/cpu/mce/core.c
> +++ b/arch/x86/kernel/cpu/mce/core.c
> @@ -2118,10 +2118,9 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
>  		mce_intel_feature_init(c);
>  		break;
>  
> -	case X86_VENDOR_AMD: {
> +	case X86_VENDOR_AMD:
>  		mce_amd_feature_init(c);
>  		break;
> -		}
>  
>  	case X86_VENDOR_HYGON:
>  		mce_hygon_feature_init(c);
> --

I think this could be a bit more substantive if you also combine the AMD
and HYGON cases. And remove mce_hygon_feature_init() which just calls
mce_amd_feature_init() anyway.

Thanks,
Yazen
Zhuo, Qiuxu Nov. 13, 2024, 1:32 p.m. UTC | #2
Hi Yazen,

> From: Yazen Ghannam <yazen.ghannam@amd.com>
> [...]
> 
> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>

Thanks!

> But please see note below.
> [...]
> > -	case X86_VENDOR_AMD: {
> > +	case X86_VENDOR_AMD:
> >  		mce_amd_feature_init(c);
> >  		break;
> > -		}
> >
> >  	case X86_VENDOR_HYGON:
> >  		mce_hygon_feature_init(c);
> > --
> 
> I think this could be a bit more substantive if you also combine the AMD and
> HYGON cases. And remove mce_hygon_feature_init() which just calls
> mce_amd_feature_init() anyway.

How about a separate patch for this? 
If It's OK for you, I'll follow up on it after the current patch series has settled.

-Qiuxu
Yazen Ghannam Nov. 13, 2024, 2:26 p.m. UTC | #3
On Wed, Nov 13, 2024 at 01:32:08PM +0000, Zhuo, Qiuxu wrote:
> Hi Yazen,
> 
> > From: Yazen Ghannam <yazen.ghannam@amd.com>
> > [...]
> > 
> > Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
> 
> Thanks!
> 
> > But please see note below.
> > [...]
> > > -	case X86_VENDOR_AMD: {
> > > +	case X86_VENDOR_AMD:
> > >  		mce_amd_feature_init(c);
> > >  		break;
> > > -		}
> > >
> > >  	case X86_VENDOR_HYGON:
> > >  		mce_hygon_feature_init(c);
> > > --
> > 
> > I think this could be a bit more substantive if you also combine the AMD and
> > HYGON cases. And remove mce_hygon_feature_init() which just calls
> > mce_amd_feature_init() anyway.
> 
> How about a separate patch for this? 
> If It's OK for you, I'll follow up on it after the current patch series has settled.
>

Sure thing. No problem.

Thanks,
Yazen
Borislav Petkov Nov. 13, 2024, 4:11 p.m. UTC | #4
On Wed, Nov 13, 2024 at 01:32:08PM +0000, Zhuo, Qiuxu wrote:
> How about a separate patch for this? 

Can you drop this micro-change per patch? Just do a single patch here which
fixes up everything mentioned during review in that area and be done with it.
Zhuo, Qiuxu Nov. 14, 2024, 1:23 a.m. UTC | #5
Hi Boris,

> From: Borislav Petkov <bp@alien8.de>
> [...]
> 
> Can you drop this micro-change per patch? Just do a single patch here which
> fixes up everything mentioned during review in that area and be done with it.

OK. I'll drop this one and replace it with Yazen's suggestion in next version.

-Qiuxu
diff mbox series

Patch

diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index d288cc7390f6..0f0c6e9d9183 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -2118,10 +2118,9 @@  static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
 		mce_intel_feature_init(c);
 		break;
 
-	case X86_VENDOR_AMD: {
+	case X86_VENDOR_AMD:
 		mce_amd_feature_init(c);
 		break;
-		}
 
 	case X86_VENDOR_HYGON:
 		mce_hygon_feature_init(c);