public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] bonding: remove unused bond_is_first_slave and bond_is_last_slave macros
@ 2026-04-04 22:04 Xiang Mei
  2026-04-09  2:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Xiang Mei @ 2026-04-04 22:04 UTC (permalink / raw)
  To: netdev; +Cc: jv, andy, davem, edumazet, kuba, pabeni, Xiang Mei

Since commit 2884bf72fb8f ("net: bonding: fix use-after-free in
bond_xmit_broadcast()"), bond_is_last_slave() was only used in
bond_xmit_broadcast().  After the recent fix replaced that usage with
a simple index comparison, bond_is_last_slave() has no remaining
callers.  bond_is_first_slave() likewise has no callers.

Remove both unused macros.

Signed-off-by: Xiang Mei <xmei5@asu.edu>
---
 include/net/bonding.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/net/bonding.h b/include/net/bonding.h
index 395c6e281c5fc..a95ec27c1c1a8 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -69,9 +69,6 @@
 #define bond_first_slave_rcu(bond) \
 	netdev_lower_get_first_private_rcu(bond->dev)
 
-#define bond_is_first_slave(bond, pos) (pos == bond_first_slave(bond))
-#define bond_is_last_slave(bond, pos) (pos == bond_last_slave(bond))
-
 /**
  * bond_for_each_slave - iterate over all slaves
  * @bond:	the bond holding this list
-- 
2.43.0


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

end of thread, other threads:[~2026-04-09  2:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-04 22:04 [PATCH net-next] bonding: remove unused bond_is_first_slave and bond_is_last_slave macros Xiang Mei
2026-04-09  2:20 ` patchwork-bot+netdevbpf

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