* [PATCH] net: phy: dp83867: fix simple_return.cocci warnings [not found] <201507241406.JSSWDBak%fengguang.wu@intel.com> @ 2015-07-24 6:16 ` kbuild test robot 2015-07-27 7:59 ` David Miller 0 siblings, 1 reply; 2+ messages in thread From: kbuild test robot @ 2015-07-24 6:16 UTC (permalink / raw) To: Dan Murphy; +Cc: kbuild-all, Florian Fainelli, netdev, linux-kernel drivers/net/phy/dp83867.c:126:1-4: WARNING: end returns can be simpified drivers/net/phy/dp83867.c:74:5-8: WARNING: end returns can be simpified if tested value is negative or 0 Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Dan Murphy <dmurphy@ti.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- dp83867.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -123,12 +123,8 @@ static int dp83867_of_init(struct phy_de if (ret) return ret; - ret = of_property_read_u32(of_node, "ti,fifo-depth", + return of_property_read_u32(of_node, "ti,fifo-depth", &dp83867->fifo_depth); - if (ret) - return ret; - - return 0; } #else static int dp83867_of_init(struct phy_device *phydev) ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: phy: dp83867: fix simple_return.cocci warnings 2015-07-24 6:16 ` [PATCH] net: phy: dp83867: fix simple_return.cocci warnings kbuild test robot @ 2015-07-27 7:59 ` David Miller 0 siblings, 0 replies; 2+ messages in thread From: David Miller @ 2015-07-27 7:59 UTC (permalink / raw) To: fengguang.wu; +Cc: dmurphy, kbuild-all, f.fainelli, netdev, linux-kernel From: kbuild test robot <fengguang.wu@intel.com> Date: Fri, 24 Jul 2015 14:16:10 +0800 > drivers/net/phy/dp83867.c:126:1-4: WARNING: end returns can be simpified > drivers/net/phy/dp83867.c:74:5-8: WARNING: end returns can be simpified if tested value is negative or 0 > > Simplify a trivial if-return sequence. Possibly combine with a > preceding function call. > > Generated by: scripts/coccinelle/misc/simple_return.cocci > > CC: Dan Murphy <dmurphy@ti.com> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Applied. ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-27 7:59 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <201507241406.JSSWDBak%fengguang.wu@intel.com> 2015-07-24 6:16 ` [PATCH] net: phy: dp83867: fix simple_return.cocci warnings kbuild test robot 2015-07-27 7:59 ` David Miller
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).