Linux USB
 help / color / mirror / Atom feed
* [PATCH 0/9] linkmode: better use bitmap API
@ 2026-09-07 21:54 Yury Norov
  2026-09-07 21:54 ` [PATCH 1/9] bitmap: add bitmap_and_and() and bitmap_and_andnot() Yury Norov
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: Yury Norov @ 2026-09-07 21:54 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit, Russell King, Raju Rangoju,
	Prashanth Kumar K R, Tony Nguyen, Przemek Kitszel, Jian Shen,
	Jijie Shao, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, linux-kernel, netdev, intel-wired-lan, linux-usb
  Cc: Yury Norov, Yury Norov, Rasmus Villemoes, Andrew Morton

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2026-09-09 12:15 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 21:54 [PATCH 0/9] linkmode: better use bitmap API Yury Norov
2026-09-07 21:54 ` [PATCH 1/9] bitmap: add bitmap_and_and() and bitmap_and_andnot() Yury Norov
2026-09-07 21:54 ` [PATCH 2/9] linkmode: make linkmode_and() return boolean Yury Norov
2026-09-08 13:04   ` Loktionov, Aleksandr
2026-09-07 21:54 ` [PATCH 3/9] net: amd: xgbe: use linkmode_and() return value in xgbe_set_link_ksettings() Yury Norov
2026-09-08 13:04   ` Loktionov, Aleksandr
2026-09-07 21:54 ` [PATCH 4/9] ixgbe: use linkmode_and() return value in ixgbe_get_eee_fw() Yury Norov
2026-09-08  9:09   ` Temerkhanov, Sergey
2026-09-08 13:06   ` Loktionov, Aleksandr
2026-09-07 21:54 ` [PATCH 5/9] net: phy: use linkmode_and() return value in genphy_c45_eee_is_active() Yury Norov
2026-09-08 13:06   ` Loktionov, Aleksandr
2026-09-07 21:54 ` [PATCH 6/9] net: avoid copies before linkmode_and() Yury Norov
2026-09-08 13:07   ` Loktionov, Aleksandr
2026-09-09 11:06   ` Jijie Shao
2026-09-07 21:54 ` [PATCH 7/9] net: phy: use linkmode operation return values in phy_device.c Yury Norov
2026-09-08 13:07   ` Loktionov, Aleksandr
2026-09-08 13:52   ` Andrew Lunn
2026-09-08 15:19     ` Yury Norov
2026-09-09 12:15       ` Andrew Lunn
2026-09-09  8:09   ` Loktionov, Aleksandr
2026-09-07 21:54 ` [PATCH 8/9] r8152: use linkmode_and_and() in EEE checks Yury Norov
2026-09-08 13:12   ` Loktionov, Aleksandr
2026-09-07 21:54 ` [PATCH 9/9] MAINTAINERS: co-maintain linkmode.h under BITMAP Yury Norov
2026-09-08 20:44   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox