Re: [PATCH] net: renesas: rswitch: simplify rswitch_stop()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rswitch_stop() opencodes for_each_set_bit().

Signed-off-by: Yury Norov (NVIDIA) <yury.norov@xxxxxxxxx>
---
  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@xxxxxxxxxxxxxxxxxx>




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux