[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <abb86e51-ae6f-4872-afe1-627824c1e763@intel.com>
Date: Fri, 18 Oct 2024 12:02:44 -0700
From: Sohil Mehta <sohil.mehta@...el.com>
To: Qiuxu Zhuo <qiuxu.zhuo@...el.com>, <tony.luck@...el.com>, <bp@...en8.de>
CC: <tglx@...utronix.de>, <dave.hansen@...ux.intel.com>, <mingo@...hat.com>,
<hpa@...or.com>, <x86@...nel.org>, <linux-edac@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 03/10] x86/mce: Make several functions return bool
On 10/16/2024 5:30 AM, Qiuxu Zhuo wrote:
> @@ -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
Powered by blists - more mailing lists