From: Dan Carpenter <dan.carpenter@oracle.com>
To: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
Thomas Renninger <trenn@suse.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Alan Cox <alan@linux.intel.com>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/4] cpupower: Remove redundant error check
Date: Sun, 18 May 2014 01:42:55 +0300 [thread overview]
Message-ID: <20140517224255.GJ15585@mwanda> (raw)
In-Reply-To: <CA+MoWDqriZojBJAaxSjjFXEf1rpxDLqtsiuYYsRqDwtY1L6QyA@mail.gmail.com>
On Sun, May 18, 2014 at 12:31:29AM +0200, Peter Senna Tschudin wrote:
> >
> > I am currently involved in a number of threads, not just yours, where I
> > am encouraging people to replace ambiguous returns with "return 0;".
> > This is my life now.
> So maybe you like this list of 160 places in which the return variable
> is initialized and only used as parameter to return(The list look
> good, but I haven't reviewed all 160, so there could be problems):
> http://pastebin.com/5kAbCP2e
Fantastic! :) These things are easy to review because if it's wrong
then the compile will break.
>
> Does it worth doing something about those trivial cases?
>
> Do you have more examples of ambiguous returns, so I can help you hunt them?
The main thing is what your check finds. If you know that ret is zero
then return zero.
regards,
dan carpenter
prev parent reply other threads:[~2014-05-17 22:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-17 18:22 [PATCH 2/4] cpupower: Remove redundant error check Peter Senna Tschudin
2014-05-17 20:22 ` Dan Carpenter
2014-05-17 21:34 ` Peter Senna Tschudin
2014-05-17 21:56 ` Dan Carpenter
2014-05-17 22:31 ` Peter Senna Tschudin
2014-05-17 22:42 ` Dan Carpenter [this message]
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=20140517224255.GJ15585@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alan@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=peter.senna@gmail.com \
--cc=rafael.j.wysocki@intel.com \
--cc=trenn@suse.de \
/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