From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>
Subject: [PATCH net-next 3/3] net: sfp: use linkmode_*() rather than open coding
Date: Wed, 15 Nov 2023 11:39:28 +0000 [thread overview]
Message-ID: <E1r3EEy-00CfCI-O7@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <ZVSt2e9Z5swJNf+7@shell.armlinux.org.uk>
Use the linkmode_*() helpers rather than open coding the calls to the
bitmap operators.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/phy/sfp-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/sfp-bus.c b/drivers/net/phy/sfp-bus.c
index 208a9393c2df..6fa679b36290 100644
--- a/drivers/net/phy/sfp-bus.c
+++ b/drivers/net/phy/sfp-bus.c
@@ -328,7 +328,7 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
* modules use 2500Mbaud rather than 3100 or 3200Mbaud for
* 2500BASE-X, so we allow some slack here.
*/
- if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS) && br_nom) {
+ if (linkmode_empty(modes) && br_nom) {
if (br_min <= 1300 && br_max >= 1200) {
phylink_set(modes, 1000baseX_Full);
__set_bit(PHY_INTERFACE_MODE_1000BASEX, interfaces);
--
2.30.2
next prev parent reply other threads:[~2023-11-15 11:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 11:39 [PATCH net-next 0/3] Add linkmode_fill, use linkmode_*() in phylink/sfp code Russell King (Oracle)
2023-11-15 11:39 ` [PATCH net-next 1/3] net: linkmode: add linkmode_fill() helper Russell King (Oracle)
2023-11-15 16:23 ` Andrew Lunn
2023-11-15 11:39 ` [PATCH net-next 2/3] net: phylink: use linkmode_fill() Russell King (Oracle)
2023-11-15 16:23 ` Andrew Lunn
2023-11-15 11:39 ` Russell King (Oracle) [this message]
2023-11-15 16:23 ` [PATCH net-next 3/3] net: sfp: use linkmode_*() rather than open coding Andrew Lunn
2023-11-16 23:50 ` [PATCH net-next 0/3] Add linkmode_fill, use linkmode_*() in phylink/sfp code patchwork-bot+netdevbpf
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=E1r3EEy-00CfCI-O7@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).