Skip to content

Commit

Permalink
phonet: use for_each_set_bit
Browse files Browse the repository at this point in the history
Replace open-coded loop with for_each_set_bit().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Akinobu Mita authored and David S. Miller committed Aug 28, 2010
1 parent e27cd4f commit 6a499b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/phonet/pn_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,7 @@ static void phonet_route_autodel(struct net_device *dev)
if (bitmap_empty(deleted, 64))
return; /* short-circuit RCU */
synchronize_rcu();
for (i = find_first_bit(deleted, 64); i < 64;
i = find_next_bit(deleted, 64, i + 1)) {
for_each_set_bit(i, deleted, 64) {
rtm_phonet_notify(RTM_DELROUTE, dev, i);
dev_put(dev);
}
Expand Down

0 comments on commit 6a499b2

Please sign in to comment.