From: "Yury Norov (NVIDIA)" <yury.norov@gmail.com>
To: "Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Nikita Yushchenko" <nikita.yoush@cogentembedded.com>,
"Michal Swiatkowski" <michal.swiatkowski@linux.intel.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Yury Norov (NVIDIA)" <yury.norov@gmail.com>
Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] net: renesas: rswitch: simplify rswitch_stop()
Date: Sat, 13 Sep 2025 14:13:45 -0400 [thread overview]
Message-ID: <20250913181345.204344-1-yury.norov@gmail.com> (raw)
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
next reply other threads:[~2025-09-13 18:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-13 18:13 Yury Norov (NVIDIA) [this message]
2025-09-14 16:56 ` Nikita Yushchenko
2025-09-15 19:01 ` Simon Horman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250913181345.204344-1-yury.norov@gmail.com \
--to=yury.norov@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=nikita.yoush@cogentembedded.com \
--cc=pabeni@redhat.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®