[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY8PR11MB713494AF7E43D936A23C091B89412@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Sat, 19 Oct 2024 03:29:44 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: "Mehta, Sohil" <sohil.mehta@...el.com>, "Luck, Tony"
<tony.luck@...el.com>, "bp@...en8.de" <bp@...en8.de>
CC: "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>, "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 v2 05/10] x86/mce/genpool: Make mce_gen_pool_create()
return explicit error codes
> From: Mehta, Sohil <sohil.mehta@...el.com>
> [...]
> > diff --git a/arch/x86/kernel/cpu/mce/genpool.c
> > b/arch/x86/kernel/cpu/mce/genpool.c
> > index 4284749ec803..ffa28769dea6 100644
> > --- a/arch/x86/kernel/cpu/mce/genpool.c
> > +++ b/arch/x86/kernel/cpu/mce/genpool.c
> > @@ -120,20 +120,20 @@ static int mce_gen_pool_create(void) {
> > int mce_numrecords, mce_poolsz, order;
> > struct gen_pool *gpool;
> > - int ret = -ENOMEM;
> > void *mce_pool;
> > + int ret;
> >
>
> Nit: Maybe move the uninitialized ret along with the other ints in the first
> line?
OK, that will save one line of code.
I'll update this in the next version.
> I had suggested something very similar but Boris felt that the current code as-
> is reads better. But that was in a slightly different context.
> https://lore.kernel.org/lkml/20240307170901.GBZen0re6AvpscLaTM@fat_crat
> e.local/
Thanks for sharing this ... 😊
-Qiuxu
Powered by blists - more mailing lists