net: renesas: rswitch: simplify rswitch_stop()
Subsystems (3)
PATCH RESEND v2 1/1 net: renesas: rswitch: simplify rswitch_stop()
rswitch_stop() opencodes for_each_set_bit().
CC Simon Horman <[email protected]>
Reviewed-by Nikita Yushchenko <[email protected]>
Signed-off-by Yury Norov (NVIDIA) <[email protected]>
---
v1: https://lore.kernel.org/all/[email protected]/
v2: Rebase on top of net-next/main
drivers/net/ethernet/renesas/rswitch_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/ethernet/renesas/rswitch_main.c +1 -3
@@ -1656,9 +1656,7 @@ static int rswitch_stop(struct net_device *ndev)if (bitmap_empty (rdev->priv->opened_ports,RSWITCH_NUM_PORTS ))iowrite32 (GWCA_TS_IRQ_BIT , rdev->priv->addr +GWTSDID ); -for (tag =find_first_bit (rdev->ts_skb_used,TS_TAGS_PER_PORT ); - tag <TS_TAGS_PER_PORT ; - tag =find_next_bit (rdev->ts_skb_used,TS_TAGS_PER_PORT , tag +1 )) { +for_each_set_bit (tag, rdev->ts_skb_used,TS_TAGS_PER_PORT ) { ts_skb =xchg (&rdev->ts_skb[tag],NULL );clear_bit (tag, rdev->ts_skb_used);if (ts_skb)
Signature · 1 line
2.43.0
Quoted 8 lines · Yury Norov (NVIDIA)
rswitch_stop()opencodesfor_each_set_bit().CC Simon Horman <[email protected]>Reviewed-by Nikita Yushchenko <[email protected]>Signed-off-by Yury Norov (NVIDIA) <[email protected]>---
v1: https://lore.kernel.org/all/[email protected]/
v2: Rebase on top of net-next/main
Thanks for the updates.
Reviewed-by Simon Horman <[email protected]>
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 10 lines · On Tue, 16 Sep 2025 12:35:16 -0400 you wrote:
rswitch_stop()opencodesfor_each_set_bit().CC Simon Horman <[email protected]>Reviewed-by Nikita Yushchenko <[email protected]>Signed-off-by Yury Norov (NVIDIA) <[email protected]>---
v1: https://lore.kernel.org/all/[email protected]/
v2: Rebase on top of net-next/main[...]
Here is the summary with links:
- [RESEND,net-next,v2] net: renesas: rswitch: simplify rswitch_stop()
https://git.kernel.org/netdev/net-next/c/18cfe3c1a121
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html