Skip to content

Commit 466b97b

Browse files
Russell King (Oracle)davem330
authored andcommitted
net: sfp: use linkmode_*() rather than open coding
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> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ba50a8d commit 466b97b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/sfp-bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
328328
* modules use 2500Mbaud rather than 3100 or 3200Mbaud for
329329
* 2500BASE-X, so we allow some slack here.
330330
*/
331-
if (bitmap_empty(modes, __ETHTOOL_LINK_MODE_MASK_NBITS) && br_nom) {
331+
if (linkmode_empty(modes) && br_nom) {
332332
if (br_min <= 1300 && br_max >= 1200) {
333333
phylink_set(modes, 1000baseX_Full);
334334
__set_bit(PHY_INTERFACE_MODE_1000BASEX, interfaces);

0 commit comments

Comments
 (0)