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

Yury Norov posted 9 patches 2 weeks, 3 days ago
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(-)
[PATCH 0/9] linkmode: better use bitmap API
Posted by Yury Norov 2 weeks, 3 days ago
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(-)

-- 
2.53.0