Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1649190

[PATCH v3 3/5] net-next: stmmac: use SPEED_xxx instead of raw value

From Corentin Labbe <clabbe.montjoie@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v3 3/5] net-next: stmmac: use SPEED_xxx instead of raw value
Date 2017-05-24 09:30 +0200
Message-ID <tKyU2-7Df-19@gated-at.bofh.it> (permalink)
References <tKyU2-7Df-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 1fb46c124ab1..5643a5c916b6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -813,12 +813,12 @@ static void stmmac_adjust_link(struct net_device *dev)
 		if (phydev->speed != priv->speed) {
 			new_state = true;
 			switch (phydev->speed) {
-			case 1000:
+			case SPEED_1000:
 				if (priv->plat->has_gmac ||
 				    priv->plat->has_gmac4)
 					ctrl &= ~priv->hw->link.port;
 				break;
-			case 100:
+			case SPEED_100:
 				if (priv->plat->has_gmac ||
 				    priv->plat->has_gmac4) {
 					ctrl |= priv->hw->link.port;
@@ -827,7 +827,7 @@ static void stmmac_adjust_link(struct net_device *dev)
 					ctrl &= ~priv->hw->link.port;
 				}
 				break;
-			case 10:
+			case SPEED_10:
 				if (priv->plat->has_gmac ||
 				    priv->plat->has_gmac4) {
 					ctrl |= priv->hw->link.port;
-- 
2.13.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/5] net-next: stmmac: rework the speed selection Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-24 09:30 +0200
  [PATCH v3 1/5] net-next: stmmac: Convert new_state to bool Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-24 09:30 +0200
  [PATCH v3 3/5] net-next: stmmac: use SPEED_xxx instead of raw value Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-24 09:30 +0200
  [PATCH v3 4/5] net-next: stmmac: Convert old_link to bool Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-05-24 09:30 +0200

csiph-web