From: Xiang Mei Date: Sat, 4 Apr 2026 22:04:12 +0000 (-0700) Subject: bonding: remove unused bond_is_first_slave and bond_is_last_slave macros X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f81f4e79b192be6c43abb256ea7da3a7dfb7899d;p=thirdparty%2Fkernel%2Flinux.git bonding: remove unused bond_is_first_slave and bond_is_last_slave macros 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 Link: https://patch.msgid.link/20260404220412.444753-1-xmei5@asu.edu Signed-off-by: Jakub Kicinski --- diff --git a/include/net/bonding.h b/include/net/bonding.h index d3520ecfa7f0..edd1942dcd73 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