[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY8PR11MB7134110DAF88820CF31BBF00895B2@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Thu, 14 Nov 2024 01:11:28 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: Yazen Ghannam <yazen.ghannam@....com>
CC: "bp@...en8.de" <bp@...en8.de>, "Luck, Tony" <tony.luck@...el.com>,
"tglx@...utronix.de" <tglx@...utronix.de>, "dave.hansen@...ux.intel.com"
<dave.hansen@...ux.intel.com>, "mingo@...hat.com" <mingo@...hat.com>,
"hpa@...or.com" <hpa@...or.com>, "Mehta, Sohil" <sohil.mehta@...el.com>,
"nik.borisov@...e.com" <nik.borisov@...e.com>, "x86@...nel.org"
<x86@...nel.org>, "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v4 5/8] x86/mce: Convert family/model mixed checks to
VFM-based checks
Hi Yazen,
> From: Yazen Ghannam <yazen.ghannam@....com>
> [...]
> > > > + if (c->x86_vfm < INTEL_NEHALEM_EP &&
> > > this_cpu_read(mce_num_banks) >
> > > > +0)
> > >
> > > The "> 0" is not needed, since mce_num_banks is unsigned int.
> >
> > I don't get your point here.
> > But it needs to check for the case where mce_num_banks == 0.
> >
>
> The check is "mce_num_banks > 0", and mce_num_banks is an unsigned int.
> Therefore, the check is reduced to "mce_num_banks != 0". In this case, you
> can just do "if (mce_num_banks)" to the same effect.
I got you. OK, if nobody else objects, I'll update it in the next version.
[ Hope others won't blame this as over-optimization. ]
-Qiuxu
Powered by blists - more mailing lists