Remove unnecessary condition check in phy
Subsystems (3)
PATCH 1/1 Remove unnecessary condition check in phy
This condition check makes no difference in the code flow since 3.10
--- drivers/net/phy/phy.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/net/phy/phy.c +1 -5
@@ -756,12 +756,8 @@ void phy_state_machine(struct work_struct *work)netif_carrier_on (phydev->attached_dev); phydev->adjust_link (phydev->attached_dev); - }else if (0 == phydev->link_timeout--) { + }else if (0 == phydev->link_timeout--) needs_aneg =1 ; -/* If we have the magic_aneg bit, we try again */ -if (phydev->drv->flags &PHY_HAS_MAGICANEG ) -break ; - }break ;case PHY_NOLINK : err =phy_read_status (phydev);
Signature · 1 line
1.7.9.5
David Miller
maintainerFrom: Balakumaran Kannan <[email protected]>
Date: Sat, 05 Apr 2014 13:00:16 +0530
Quoted 3 lines
This condition check makes no difference in the code flow since 3.10
Signed-off-by Balakumaran Kannan <[email protected]>
The big questions is, was this intentional?
Florian Fainelli
Reviewed-by2014-04-07 11:58 GMT-07:00 David Miller <[email protected]>:
Quoted 8 lines
From: Balakumaran Kannan <[email protected]>
Date: Sat, 05 Apr 2014 13:00:16 +0530Quoted 3 lines
This condition check makes no difference in the code flow since 3.10
Signed-off-by Balakumaran Kannan <[email protected]>The big questions is, was this intentional?
It was before a33e6112d9b0 ("phy: Elimination the forced speed reduction algorithm") because the PHY having PHY_HAS_MAGICANEG set would not go through the PHY speed reduction algorithm. Now, this is useless as there is a subsequent break and no conditional code based on PHY_HAS_MAGICANEG (which means that we should also kill its usage at some point).
Feel free to add my reviewed-by tag after fixing the mangling David spotted.
Signature · 1 line
Florian
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Mon, 7 Apr 2014 18:09:00 -0700
Quoted 8 lines
2014-04-07 11:58 GMT-07:00 David Miller <[email protected]>:
Quoted 7 lines
From: Balakumaran Kannan <[email protected]>
Date: Sat, 05 Apr 2014 13:00:16 +0530Quoted 3 lines
This condition check makes no difference in the code flow since 3.10
Signed-off-by Balakumaran Kannan <[email protected]>
Quoted 8 lines
Quoted 1 line
The big questions is, was this intentional?
It was before
a33e6112d9b0("phy: Elimination the forced speed reduction algorithm") because the PHY havingPHY_HAS_MAGICANEGset would not go through the PHY speed reduction algorithm. Now, this is useless as there is a subsequent break and no conditional code based onPHY_HAS_MAGICANEG(which means that we should also kill its usage at some point).
Yep, I read through the history and that's why I noticed the patch didn't apply, I was about to apply it :-)
Quoted 3 lines
Feel free to add my reviewed-by tag after fixing the mangling David spotted.
Reviewed-by Florian Fainelli <[email protected]>
Will do, thanks Florian.
David Miller
maintainerFrom: Balakumaran Kannan <[email protected]>
Date: Sat, 05 Apr 2014 13:00:16 +0530
Quoted 3 lines
This condition check makes no difference in the code flow since 3.10
Signed-off-by Balakumaran Kannan <[email protected]>
This patch doesn't apply cleanly to the current tree.
It's because your email client corrupted the patch, changing TAB characters into spaces amongst other things.
Also your subject line is not properly formed. It should state the subsystem after the closing bracket, followed by ": " then the top-level description of your change.