netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: renesas: rswitch: simplify rswitch_stop()
@ 2025-09-13 18:13 Yury Norov (NVIDIA)
  2025-09-14 16:56 ` Nikita Yushchenko
  2025-09-15 19:01 ` Simon Horman
  0 siblings, 2 replies; 3+ messages in thread
From: Yury Norov (NVIDIA) @ 2025-09-13 18:13 UTC (permalink / raw)
  To: Yoshihiro Shimoda, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Nikita Yushchenko,
	Michal Swiatkowski, Geert Uytterhoeven, Uwe Kleine-König,
	Yury Norov (NVIDIA)
  Cc: netdev, linux-renesas-soc, linux-kernel

rswitch_stop() opencodes for_each_set_bit().

Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
---
 drivers/net/ethernet/renesas/rswitch.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index aba772e14555..9497c738b828 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -1627,9 +1627,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)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: renesas: rswitch: simplify rswitch_stop()
  2025-09-13 18:13 [PATCH] net: renesas: rswitch: simplify rswitch_stop() Yury Norov (NVIDIA)
@ 2025-09-14 16:56 ` Nikita Yushchenko
  2025-09-15 19:01 ` Simon Horman
  1 sibling, 0 replies; 3+ messages in thread
From: Nikita Yushchenko @ 2025-09-14 16:56 UTC (permalink / raw)
  To: Yury Norov (NVIDIA), Yoshihiro Shimoda, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Michal Swiatkowski, Geert Uytterhoeven, Uwe Kleine-König
  Cc: netdev, linux-renesas-soc, linux-kernel

> rswitch_stop() opencodes for_each_set_bit().
> 
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
> ---
>   drivers/net/ethernet/renesas/rswitch.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
> index aba772e14555..9497c738b828 100644
> --- a/drivers/net/ethernet/renesas/rswitch.c
> +++ b/drivers/net/ethernet/renesas/rswitch.c
> @@ -1627,9 +1627,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)

Probably shall be [PATCH net], otherwise

Reviewed-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: renesas: rswitch: simplify rswitch_stop()
  2025-09-13 18:13 [PATCH] net: renesas: rswitch: simplify rswitch_stop() Yury Norov (NVIDIA)
  2025-09-14 16:56 ` Nikita Yushchenko
@ 2025-09-15 19:01 ` Simon Horman
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-09-15 19:01 UTC (permalink / raw)
  To: Yury Norov (NVIDIA)
  Cc: Yoshihiro Shimoda, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Nikita Yushchenko,
	Michal Swiatkowski, Geert Uytterhoeven, Uwe Kleine-König,
	netdev, linux-renesas-soc, linux-kernel

On Sat, Sep 13, 2025 at 02:13:45PM -0400, Yury Norov (NVIDIA) wrote:
> rswitch_stop() opencodes for_each_set_bit().
> 
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>

This does not apply against net-next (rswitch.c seems to have been renamed).
So please rebase and resend.

You can include Nikita's tag when doing so, unless you feel there
is a material change to the patch.

Also, please tag the patch for net-next like this:

Subject: [PATCH net-next v2] ...

-- 
pw-bot: changes-requested

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-15 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-13 18:13 [PATCH] net: renesas: rswitch: simplify rswitch_stop() Yury Norov (NVIDIA)
2025-09-14 16:56 ` Nikita Yushchenko
2025-09-15 19:01 ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).