lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a9d9967d-ef5d-47ff-88a5-b1fcf9bcd319@cogentembedded.com>
Date: Sun, 14 Sep 2025 18:56:12 +0200
From: Nikita Yushchenko <nikita.yoush@...entembedded.com>
To: "Yury Norov (NVIDIA)" <yury.norov@...il.com>,
 Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
 Geert Uytterhoeven <geert+renesas@...der.be>,
 Uwe Kleine-König <u.kleine-koenig@...libre.com>
Cc: netdev@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: renesas: rswitch: simplify rswitch_stop()

> rswitch_stop() opencodes for_each_set_bit().
> 
> Signed-off-by: Yury Norov (NVIDIA) <yury.norov@...il.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@...entembedded.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ