diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2010-08-27 15:08:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-28 18:37:04 -0400 |
commit | 6a499b242f7d1ebf13f5bc386e08e80603f79e2a (patch) | |
tree | 50383400eed30c6d5b6349f18d61af404de206aa /net/phonet/pn_dev.c | |
parent | e27cd4f8ca9dde7938f4f83ef75b6fae8d46dd5f (diff) |
phonet: use for_each_set_bit
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>
Diffstat (limited to 'net/phonet/pn_dev.c')
-rw-r--r-- | net/phonet/pn_dev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index b18e48fae975..d0a429459370 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c | |||
@@ -292,8 +292,7 @@ static void phonet_route_autodel(struct net_device *dev) | |||
292 | if (bitmap_empty(deleted, 64)) | 292 | if (bitmap_empty(deleted, 64)) |
293 | return; /* short-circuit RCU */ | 293 | return; /* short-circuit RCU */ |
294 | synchronize_rcu(); | 294 | synchronize_rcu(); |
295 | for (i = find_first_bit(deleted, 64); i < 64; | 295 | for_each_set_bit(i, deleted, 64) { |
296 | i = find_next_bit(deleted, 64, i + 1)) { | ||
297 | rtm_phonet_notify(RTM_DELROUTE, dev, i); | 296 | rtm_phonet_notify(RTM_DELROUTE, dev, i); |
298 | dev_put(dev); | 297 | dev_put(dev); |
299 | } | 298 | } |