* [PATCH] phonet: use for_each_set_bit
@ 2010-08-28 5:08 Akinobu Mita
2010-08-28 22:37 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2010-08-28 5:08 UTC (permalink / raw)
To: netdev; +Cc: Akinobu Mita, David S. Miller
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
---
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 b18e48f..d0a4294 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)
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);
}
--
1.6.0.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phonet: use for_each_set_bit
2010-08-28 5:08 [PATCH] phonet: use for_each_set_bit Akinobu Mita
@ 2010-08-28 22:37 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-08-28 22:37 UTC (permalink / raw)
To: akinobu.mita; +Cc: netdev
From: Akinobu Mita <akinobu.mita@gmail.com>
Date: Sat, 28 Aug 2010 14:08:26 +0900
> 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
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-28 22:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-28 5:08 [PATCH] phonet: use for_each_set_bit Akinobu Mita
2010-08-28 22:37 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).