From: "Hawa, Hanna" <hhhawa@amazon.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Robert Richter <rrichter@marvell.com>,
"mchehab@kernel.org" <mchehab@kernel.org>,
"james.morse@arm.com" <james.morse@arm.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dwmw@amazon.co.uk" <dwmw@amazon.co.uk>,
"benh@amazon.com" <benh@amazon.com>,
"ronenk@amazon.com" <ronenk@amazon.com>,
"talel@amazon.com" <talel@amazon.com>,
"jonnyc@amazon.com" <jonnyc@amazon.com>,
"hanochu@amazon.com" <hanochu@amazon.com>
Subject: Re: [PATCH 1/1] edac: Add an API for edac device to report for multiple errors
Date: Tue, 10 Sep 2019 14:10:13 +0300 [thread overview]
Message-ID: <488b07a8-ce39-d3fe-4e73-5e6f19176f1b@amazon.com> (raw)
In-Reply-To: <20190908083535.GD16220@zn.tnic>
Hi
On 9/8/2019 11:35 AM, Borislav Petkov wrote:
> On Sun, Sep 08, 2019 at 10:16:02AM +0200, Borislav Petkov wrote:
>> On Sun, Sep 08, 2019 at 10:58:31AM +0300, Hawa, Hanna wrote:
>>>> Better use WARN_ON_ONCE() to avoid flooding.
>>>
>>> In case of two drivers using this function with wrong error count, only the
>>> first WARN_ON_ONCE will catch in this case, and other will miss other wrong
>>> usage of other edac device drivers.
>>
>> The idea is to catch any driver using a 0 error count and fix it, not to
>> flood dmesg. You want _ONCE.
>
> ... and you want to return early too, i.e.,
>
> if (WARN_ON_ONCE(!error_count))
> return;
>
> Frankly, I'd even remove all the warning functionality and simply do
>
> if (!error_count)
> return;
I'll keep it simple as you suggest and remove the warning functionality.
>
> but let's see how much it screams first.
>
Thanks,
Hanna
next prev parent reply other threads:[~2019-09-10 11:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 8:37 [PATCH 1/1] edac: Add an API for edac device to report for multiple errors Hanna Hawa
2019-09-05 9:56 ` Robert Richter
2019-09-08 7:58 ` Hawa, Hanna
2019-09-08 8:16 ` Borislav Petkov
2019-09-08 8:35 ` Borislav Petkov
2019-09-10 11:10 ` Hawa, Hanna [this message]
2019-09-10 12:42 ` Robert Richter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=488b07a8-ce39-d3fe-4e73-5e6f19176f1b@amazon.com \
--to=hhhawa@amazon.com \
--cc=benh@amazon.com \
--cc=bp@alien8.de \
--cc=dwmw@amazon.co.uk \
--cc=hanochu@amazon.com \
--cc=james.morse@arm.com \
--cc=jonnyc@amazon.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ronenk@amazon.com \
--cc=rrichter@marvell.com \
--cc=talel@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).