From: Marc Gonzalez Date: Fri, 28 Jul 2017 11:18:30 +0000 (+0200) Subject: net: phy: Log only PHY state transitions X-Git-Tag: v4.14-rc1~130^2~416 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a95befc8d0346d6cb3b4646c761e8b42e66a4df;p=platform%2Fkernel%2Flinux-rpi3.git net: phy: Log only PHY state transitions In the current code, old and new PHY states are always logged. >From now on, log only PHY state transitions. Signed-off-by: Marc Gonzalez Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index ac1dcf0..3aedf41 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1225,9 +1225,10 @@ void phy_state_machine(struct work_struct *work) if (err < 0) phy_error(phydev); - phydev_dbg(phydev, "PHY state change %s -> %s\n", - phy_state_to_str(old_state), - phy_state_to_str(phydev->state)); + if (old_state != phydev->state) + phydev_dbg(phydev, "PHY state change %s -> %s\n", + phy_state_to_str(old_state), + phy_state_to_str(phydev->state)); /* Only re-schedule a PHY state machine change if we are polling the * PHY, if PHY_IGNORE_INTERRUPT is set, then we will be moving