Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <xmei5@asu.edu>
Link: https://patch.msgid.link/20260404220412.444753-1-xmei5@asu.edu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Xiang Mei and committed by
Jakub Kicinski
f81f4e79 bd5c24e4

-3
-3
include/net/bonding.h
··· 69 69 #define bond_first_slave_rcu(bond) \ 70 70 netdev_lower_get_first_private_rcu(bond->dev) 71 71 72 - #define bond_is_first_slave(bond, pos) (pos == bond_first_slave(bond)) 73 - #define bond_is_last_slave(bond, pos) (pos == bond_last_slave(bond)) 74 - 75 72 /** 76 73 * bond_for_each_slave - iterate over all slaves 77 74 * @bond: the bond holding this list