From: Borislav Petkov <bp@alien8.de>
To: "Hawa, Hanna" <hhhawa@amazon.com>
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: Sun, 8 Sep 2019 10:35:35 +0200 [thread overview]
Message-ID: <20190908083535.GD16220@zn.tnic> (raw)
In-Reply-To: <20190908081602.GC16220@zn.tnic>
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;
but let's see how much it screams first.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2019-09-08 8:35 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 [this message]
2019-09-10 11:10 ` Hawa, Hanna
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=20190908083535.GD16220@zn.tnic \
--to=bp@alien8.de \
--cc=benh@amazon.com \
--cc=dwmw@amazon.co.uk \
--cc=hanochu@amazon.com \
--cc=hhhawa@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.