Skip to contentSkip to conversation

net: renesas: rswitch: simplify rswitch_stop()

PATCH RESEND Applied Yury Norov (NVIDIA) 3 participants 3 messages Sep 16, 2025 – Sep 18, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/1 net: renesas: rswitch: simplify rswitch_stop()

rswitch_stop() opencodes for_each_set_bit().

---
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
index ff5f966c98a9..69676db20fec 100644
@@ -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
#2 lore raw
In reply to Yury Norov (NVIDIA)
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() opencodes for_each_set_bit().

---
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