* [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* Re: [PATCH net-next] bonding: remove unused bond_is_first_slave and bond_is_last_slave macros
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
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-04-09 2:20 UTC (permalink / raw)
To: Xiang Mei; +Cc: netdev, jv, andy, davem, edumazet, kuba, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sat, 4 Apr 2026 15:04:12 -0700 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net-next] bonding: remove unused bond_is_first_slave and bond_is_last_slave macros
https://git.kernel.org/netdev/net-next/c/f81f4e79b192
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [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