[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1333384945.15422.14.camel@joe2Laptop>
Date: Mon, 02 Apr 2012 09:42:25 -0700
From: Joe Perches <joe@...ches.com>
To: Srinivas KANDAGATLA <srinivas.kandagatla@...com>
Cc: netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH 3.3.0 1/3] net:phy:bcm63xx: remove unnecessary code
On Mon, 2012-04-02 at 17:24 +0100, Srinivas KANDAGATLA wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@...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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists