summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
diff options
context:
space:
mode:
authorLABBE Corentin2017-02-15 10:46:39 +0100
committerDavid S. Miller2017-02-15 19:20:54 +0100
commit3e12790eed9da7ac0e20b94690ce5de209540168 (patch)
treefcccbd4ce4cd50b78969b0c9189fd9a583cb00f4 /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
parentnet: stmmac: remove useless parenthesis (diff)
downloadkernel-qcow2-linux-3e12790eed9da7ac0e20b94690ce5de209540168.tar.gz
kernel-qcow2-linux-3e12790eed9da7ac0e20b94690ce5de209540168.tar.xz
kernel-qcow2-linux-3e12790eed9da7ac0e20b94690ce5de209540168.zip
net: stmmac: likely is useless in occasional function
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>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index ee1dbf4b2329..511c47cf6aad 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -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;