From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Joe Perches <joe@perches.com>
Cc: "SF Markus Elfring" <elfring@users.sourceforge.net>,
linux-mips@linux-mips.org, "Ralf Bächle" <ralf@linux-mips.org>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] TC: Delete an error message for a failed memory allocation in tc_bus_add_devices()
Date: Mon, 11 Dec 2017 13:17:05 +0000 (GMT) [thread overview]
Message-ID: <alpine.LFD.2.21.1712110244450.4266@eddie.linux-mips.org> (raw)
In-Reply-To: <1512957931.26342.31.camel@perches.com>
On Sun, 10 Dec 2017, Joe Perches wrote:
> > > Omit an extra message for a memory allocation failure in this function.
> > >
> > > This issue was detected by using the Coccinelle software.
> >
> > And the problem here is?
>
> Markus' terrible commit messages.
>
> Generically, any OOM via a malloc like call has a dump_stack()
> which shows a stack trace unless __GFP_NOWARN is used.
>
> So this message is generally unnecessary as the dump_stack()
> will show the tc_bus_add_devices function name and (now hashed)
> value of the function address.
Fair enough.
> What will be different is the particular slot # of the tc_dev
> will no longer be shown.
>
> Really though, if there's an OOM on the init, there are larger
> problems and the system will be unusable.
Well, the problem may well be the caller doing something silly, so we do
want to have it identified, hence the extra message. Given that, as you
say, `kzalloc' already provides the necessary diagnostic I agree the
message can go.
However I would indeed prefer that a commit description is at least
exhaustive enough for such a dumb reviewer as I am to understand what is
going on right away. So please make it say at least:
"Remove an extraneous message that duplicates the diagnostic already
provided by `kzalloc' for a memory allocation failure in this function."
or suchlike in v2 for me to apply a Reviewed-by: tag.
Thanks,
Maciej
next prev parent reply other threads:[~2017-12-11 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-10 17:48 SF Markus Elfring
2017-12-10 21:41 ` Maciej W. Rozycki
2017-12-11 2:05 ` Joe Perches
2017-12-11 13:17 ` Maciej W. Rozycki [this message]
2017-12-11 13:38 ` SF Markus Elfring
2017-12-11 8:15 ` SF Markus Elfring
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=alpine.LFD.2.21.1712110244450.4266@eddie.linux-mips.org \
--to=macro@linux-mips.org \
--cc=elfring@users.sourceforge.net \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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
Powered by JetHome