netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] Remove unnecessary condition check in phy
@ 2014-04-05  7:30 Balakumaran Kannan
  2014-04-07 18:58 ` David Miller
  2014-04-08  0:55 ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Balakumaran Kannan @ 2014-04-05  7:30 UTC (permalink / raw)
  To: netdev, f.fainelli

This condition check makes no difference in the code flow since 3.10

Signed-off-by: Balakumaran Kannan <kumaran.4353@gmail.com>
---
 drivers/net/phy/phy.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 1d788f1..1b6d09a 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -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);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net] Remove unnecessary condition check in phy
  2014-04-05  7:30 [PATCH net] Remove unnecessary condition check in phy Balakumaran Kannan
@ 2014-04-07 18:58 ` David Miller
  2014-04-08  1:09   ` Florian Fainelli
  2014-04-08  0:55 ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2014-04-07 18:58 UTC (permalink / raw)
  To: kumaran.4353; +Cc: netdev, f.fainelli

From: Balakumaran Kannan <kumaran.4353@gmail.com>
Date: Sat, 05 Apr 2014 13:00:16 +0530

> This condition check makes no difference in the code flow since 3.10
> 
> Signed-off-by: Balakumaran Kannan <kumaran.4353@gmail.com>

The big questions is, was this intentional?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net] Remove unnecessary condition check in phy
  2014-04-05  7:30 [PATCH net] Remove unnecessary condition check in phy Balakumaran Kannan
  2014-04-07 18:58 ` David Miller
@ 2014-04-08  0:55 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2014-04-08  0:55 UTC (permalink / raw)
  To: kumaran.4353; +Cc: netdev, f.fainelli

From: Balakumaran Kannan <kumaran.4353@gmail.com>
Date: Sat, 05 Apr 2014 13:00:16 +0530

> This condition check makes no difference in the code flow since 3.10
> 
> Signed-off-by: Balakumaran Kannan <kumaran.4353@gmail.com>

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net] Remove unnecessary condition check in phy
  2014-04-07 18:58 ` David Miller
@ 2014-04-08  1:09   ` Florian Fainelli
  2014-04-08  1:15     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2014-04-08  1:09 UTC (permalink / raw)
  To: David Miller; +Cc: kumaran.4353, netdev

2014-04-07 11:58 GMT-07:00 David Miller <davem@davemloft.net>:
> From: Balakumaran Kannan <kumaran.4353@gmail.com>
> Date: Sat, 05 Apr 2014 13:00:16 +0530
>
>> This condition check makes no difference in the code flow since 3.10
>>
>> Signed-off-by: Balakumaran Kannan <kumaran.4353@gmail.com>
>
> 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.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net] Remove unnecessary condition check in phy
  2014-04-08  1:09   ` Florian Fainelli
@ 2014-04-08  1:15     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2014-04-08  1:15 UTC (permalink / raw)
  To: f.fainelli; +Cc: kumaran.4353, netdev

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Mon, 7 Apr 2014 18:09:00 -0700

> 2014-04-07 11:58 GMT-07:00 David Miller <davem@davemloft.net>:
>> From: Balakumaran Kannan <kumaran.4353@gmail.com>
>> Date: Sat, 05 Apr 2014 13:00:16 +0530
>>
>>> This condition check makes no difference in the code flow since 3.10
>>>
>>> Signed-off-by: Balakumaran Kannan <kumaran.4353@gmail.com>
>>
>> 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).

Yep, I read through the history and that's why I noticed the patch didn't
apply, I was about to apply it :-)

> Feel free to add my reviewed-by tag after fixing the mangling David spotted.
> 
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Will do, thanks Florian.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-08  1:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-05  7:30 [PATCH net] Remove unnecessary condition check in phy Balakumaran Kannan
2014-04-07 18:58 ` David Miller
2014-04-08  1:09   ` Florian Fainelli
2014-04-08  1:15     ` David Miller
2014-04-08  0:55 ` 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).