net: stmmac: likely is useless in occasional function
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Wed, 15 Feb 2017 09:46:39 +0000 (10:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Feb 2017 18:20:54 +0000 (13:20 -0500)
The stmmac_adjust_link() function is called too rarely for having
likely() macros being useful.
Just remove likely annotation in it.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Reviewed-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index ee1dbf4b232904fe3d4dd4d0d920f17c127951f4..511c47cf6aad589dfa744834fb9f1fd1f99c1d59 100644 (file)
@@ -716,15 +716,15 @@ static void stmmac_adjust_link(struct net_device *dev)
                        new_state = 1;
                        switch (phydev->speed) {
                        case 1000:
-                               if (likely(priv->plat->has_gmac ||
-                                          priv->plat->has_gmac4))
+                               if (priv->plat->has_gmac ||
+                                   priv->plat->has_gmac4)
                                        ctrl &= ~priv->hw->link.port;
                                stmmac_hw_fix_mac_speed(priv);
                                break;
                        case 100:
                        case 10:
-                               if (likely(priv->plat->has_gmac ||
-                                          priv->plat->has_gmac4)) {
+                               if (priv->plat->has_gmac ||
+                                   priv->plat->has_gmac4) {
                                        ctrl |= priv->hw->link.port;
                                        if (phydev->speed == SPEED_100) {
                                                ctrl |= priv->hw->link.speed;