Commit 6a499b24 authored by Akinobu Mita's avatar Akinobu Mita Committed by David S. Miller

phonet: use for_each_set_bit

Replace open-coded loop with for_each_set_bit().
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e27cd4f8
...@@ -292,8 +292,7 @@ static void phonet_route_autodel(struct net_device *dev) ...@@ -292,8 +292,7 @@ static void phonet_route_autodel(struct net_device *dev)
if (bitmap_empty(deleted, 64)) if (bitmap_empty(deleted, 64))
return; /* short-circuit RCU */ return; /* short-circuit RCU */
synchronize_rcu(); synchronize_rcu();
for (i = find_first_bit(deleted, 64); i < 64; for_each_set_bit(i, deleted, 64) {
i = find_next_bit(deleted, 64, i + 1)) {
rtm_phonet_notify(RTM_DELROUTE, dev, i); rtm_phonet_notify(RTM_DELROUTE, dev, i);
dev_put(dev); dev_put(dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment