Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: David Miller <davem@davemloft.net>
Cc: clabbe@baylibre.com, netdev <netdev@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	hkallweit1@gmail.com, Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH] net: ethernet:fec: Consistently use SPEED_ prefix
Date: Sat, 20 Oct 2018 22:48:11 +0200	[thread overview]
Message-ID: <1540068491-14760-1-git-send-email-andrew@lunn.ch> (raw)

All other calls to phy_set_max_speed() use the SPEED_ prefix. Make the
FEC driver follow this common pattern. This makes no different to
generated code since SPEED_1000 is 1000, and SPEED_100 is 100.

Reported-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/ethernet/freescale/fec_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 6db69ba30dcd..b067eaf8b792 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1948,7 +1948,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
 
 	/* mask with MAC supported features */
 	if (fep->quirks & FEC_QUIRK_HAS_GBIT) {
-		phy_set_max_speed(phy_dev, 1000);
+		phy_set_max_speed(phy_dev, SPEED_1000);
 		phy_remove_link_mode(phy_dev,
 				     ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
 #if !defined(CONFIG_M5272)
@@ -1956,7 +1956,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
 #endif
 	}
 	else
-		phy_set_max_speed(phy_dev, 100);
+		phy_set_max_speed(phy_dev, SPEED_100);
 
 	fep->link = 0;
 	fep->full_duplex = 0;
-- 
2.19.0

             reply	other threads:[~2018-10-21  5:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-20 20:48 Andrew Lunn [this message]
2018-10-21  8:25 ` [PATCH] net: ethernet:fec: Consistently use SPEED_ prefix Sergei Shtylyov
2018-10-22  2:41 ` Andy Duan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1540068491-14760-1-git-send-email-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=clabbe@baylibre.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox