netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: Re: [PATCH 3.3.0 1/3] net:phy:bcm63xx: remove unnecessary code
Date: Mon, 02 Apr 2012 09:42:25 -0700	[thread overview]
Message-ID: <1333384945.15422.14.camel@joe2Laptop> (raw)
In-Reply-To: <1333383895-23889-1-git-send-email-srinivas.kandagatla@st.com>

On Mon, 2012-04-02 at 17:24 +0100, Srinivas KANDAGATLA wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
> 
> Compile tested.
> remove unnecessary code that matches this coccinelle pattern
> 
> 	ret = phy_write(x, y , z)
> 	if (ret < 0)
> 		return ret;
> 	return 0;
> 
> As phy_write returns error code, we dont need to do not need extra check
> before returning.

Do these really make any functional difference?
Doesn't the compiler generate the same output?

Many times, there's a code pattern that precedes these
calls has a similar pattern and changing the pattern
for the last call in a sequence can be jarring to a
reader and changing the pattern can sometimes introduce
errors as well.

  reply	other threads:[~2012-04-02 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 16:24 [PATCH 3.3.0 1/3] net:phy:bcm63xx: remove unnecessary code Srinivas KANDAGATLA
2012-04-02 16:42 ` Joe Perches [this message]
2012-04-02 16:51   ` Srinivas KANDAGATLA
2012-04-02 17:02     ` Joe Perches
2012-04-03  9:49       ` Srinivas KANDAGATLA
2012-04-03 23:02         ` David Miller

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=1333384945.15422.14.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=srinivas.kandagatla@st.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).