[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY8PR11MB7134681D1C16EEFFA37F9CED89412@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Sat, 19 Oct 2024 03:00:16 +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 03/10] x86/mce: Make several functions return bool
> From: Mehta, Sohil <sohil.mehta@...el.com>
> [...]
> > @@ -1748,7 +1748,7 @@ static void mce_timer_delete_all(void)
> > * Can be called from interrupt context, but not from machine check/NMI
> > * context.
> > */
> > -int mce_notify_irq(void)
> > +bool mce_notify_irq(void)
> > {
> > /* Not more than two messages every minute */
> > static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2); @@ -1759,9
> > +1759,9 @@ int mce_notify_irq(void)
> > if (__ratelimit(&ratelimit))
> > pr_info(HW_ERR "Machine check events logged\n");
> >
> > - return 1;
> > + return true;
> > }
> > - return 0;
> > + return false;
> > }
> > EXPORT_SYMBOL_GPL(mce_notify_irq);
> >
>
> I am slightly confused by the function name mce_notify_irq() and the boolean
> meaning. Would it better to rename this function to mce_notify_user()? As
> the comment suggests on top, it purpose doesn't seem to be irq related but
> to mainly notify the user.
> Also, the boolean would probably make more sense then:
> True -> Notified the user
> False -> Did not notify the user
Agree. mce_notify_user() better reflects what it does.
If nobody else objects to it, I'll update the function name in the next version.
Thanks!
-Qiuxu
Powered by blists - more mailing lists