Skip to content

Commit

Permalink
net: stmmac: likely is useless in occasional function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Giuseppe Cavallaro <[email protected]>
Reviewed-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
montjoie authored and davem330 committed Feb 15, 2017
1 parent cb2c0ac commit 3e12790
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3e12790

Please sign in to comment.