Skip to content

linkmode: better use bitmap API

Yury Norov intel-wired-lan linux-usb lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9bitmap: add bitmap_and_and() and bitmap_and_andnot()include/linux/bitmap.h lib/bitmap.c lib/test_bitmap.c+146 -100 replies
2/9linkmode: make linkmode_and() return booleaninclude/linux/linkmode.h+2 -21 reply
3/9net: amd: xgbe: use linkmode_and() return value in xgbe_set_link_ksettings()drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c+5 -41 reply
4/9ixgbe: use linkmode_and() return value in ixgbe_get_eee_fw()drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c+1 -22 replies
5/9net: phy: use linkmode_and() return value in genphy_c45_eee_is_active()drivers/net/phy/phy-c45.c+1 -21 reply
6/9net: avoid copies before linkmode_and()drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c drivers/net/phy/phy.c+5 -72 replies
7/9net: phy: use linkmode operation return values in phy_device.cdrivers/net/phy/phy_device.c include/linux/linkmode.h+15 -85 replies
8/9r8152: use linkmode_and_and() in EEE checksdrivers/net/usb/r8152.c include/linux/linkmode.h+12 -61 reply
9/9MAINTAINERS: co-maintain linkmode.h under BITMAPMAINTAINERS+1 -01 reply

Reviews trailers per patch

7 of 9 patches have a Reviewed-by or Acked-by.

PatchSergey TemerkhanovAleksandr Loktionov
1/9
2/9R-b
3/9R-b
4/9R-b R-b
5/9R-b
6/9R-b
7/9R-b R-b
8/9R-b
9/9

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/9] linkmode: better use bitmap API

Several linkmode users discard the return value of bitmap_and() and then call linkmode_empty() on the result. Propagate the return value through linkmode_and() and use it to avoid redundant bitmap scans.

Add bitmap_and_and() and bitmap_and_andnot() for callers that combine three masks. The new helpers perform the operation and emptiness check in a single pass.

Yury Norov (9):
bitmap: add bitmap_and_and() and bitmap_and_andnot()
linkmode: make linkmode_and() return boolean
net: amd: xgbe: use linkmode_and() return value in
xgbe_set_link_ksettings()
ixgbe: use linkmode_and() return value in ixgbe_get_eee_fw()
net: phy: use linkmode_and() return value in

    genphy_c45_eee_is_active()

net: avoid copies before linkmode_and()
net: phy: use linkmode operation return values in phy_device.c
r8152: use linkmode_and_and() in EEE checks
MAINTAINERS: co-maintain linkmode.h under BITMAP

 MAINTAINERS                                   |  1 +
 drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c  |  9 ++-
 .../hisilicon/hns3/hns3pf/hclge_mdio.c        |  5 +-
 .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c  |  3 +-
 drivers/net/phy/phy-c45.c                     |  3 +-
 drivers/net/phy/phy.c                         |  7 +-
 drivers/net/phy/phy_device.c                  | 14 ++--
 drivers/net/usb/r8152.c                       | 10 +--
 include/linux/bitmap.h                        | 32 ++++++++
 include/linux/linkmode.h                      | 21 ++++-
 lib/bitmap.c                                  | 46 ++++++++---
 lib/test_bitmap.c                             | 78 +++++++++++++++++++
 12 files changed, 188 insertions(+), 41 deletions(-)
Signature · 1 line
2.53.0