Skip to contentSkip to conversation

phonet: use for_each_set_bit

PATCH Applied Akinobu Mita 2 participants 2 messages Aug 28, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phonet: use for_each_set_bit

Replace open-coded loop with for_each_set_bit().

---
 net/phonet/pn_dev.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
net/phonet/pn_dev.c +1 -2
index b18e48f..d0a4294 100644
@@ -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);
 	}
Signature · 1 line
1.6.0.6