From: Dan Carpenter <dan.carpenter@oracle.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Joe Perches <joe@perches.com>,
Quentin Lambert <lambert.quentin@gmail.com>,
Ming Lei <ming.lei@canonical.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/1] drivers/base: Remove unnecessary OOM message
Date: Sat, 07 Feb 2015 10:24:36 +0000 [thread overview]
Message-ID: <20150207102436.GB5206@mwanda> (raw)
In-Reply-To: <20150206211708.GA25967@amd>
Facts:
1) None of these four error messages will ever be printed.
http://lwn.net/Articles/627419/
2) These messages are a waste of RAM.
Debatable:
1) These messages are bad style and distracting. Simple code is better.
2) The normal OOM message is enough to find which allocation failed.
Not everbody, but a lot of people write these kinds of error messages
with their brain on auto-pilot because they think they *should* do it.
It's quite common to do things like printk("dev is NULL. %s",
dev->name);. I'm happy for this checkpatch warning because it hopefully
bumps people out of mindless mode and makes them think about error
messages.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Joe Perches <joe@perches.com>,
Quentin Lambert <lambert.quentin@gmail.com>,
Ming Lei <ming.lei@canonical.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/1] drivers/base: Remove unnecessary OOM message
Date: Sat, 7 Feb 2015 13:24:36 +0300 [thread overview]
Message-ID: <20150207102436.GB5206@mwanda> (raw)
In-Reply-To: <20150206211708.GA25967@amd>
Facts:
1) None of these four error messages will ever be printed.
http://lwn.net/Articles/627419/
2) These messages are a waste of RAM.
Debatable:
1) These messages are bad style and distracting. Simple code is better.
2) The normal OOM message is enough to find which allocation failed.
Not everbody, but a lot of people write these kinds of error messages
with their brain on auto-pilot because they think they *should* do it.
It's quite common to do things like printk("dev is NULL. %s",
dev->name);. I'm happy for this checkpatch warning because it hopefully
bumps people out of mindless mode and makes them think about error
messages.
regards,
dan carpenter
next prev parent reply other threads:[~2015-02-07 10:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 15:39 [PATCH 1/1] drivers/base: Remove unnecessary OOM message Quentin Lambert
2015-02-06 15:39 ` Quentin Lambert
2015-02-06 20:58 ` Pavel Machek
2015-02-06 20:58 ` Pavel Machek
2015-02-06 21:04 ` Joe Perches
2015-02-06 21:04 ` Joe Perches
2015-02-06 21:17 ` Pavel Machek
2015-02-06 21:17 ` Pavel Machek
2015-02-07 10:24 ` Dan Carpenter [this message]
2015-02-07 10:24 ` Dan Carpenter
2015-02-08 23:28 ` Rafael J. Wysocki
2015-02-08 23:28 ` Rafael J. Wysocki
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=20150207102436.GB5206@mwanda \
--to=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lambert.quentin@gmail.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
/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.