* [PATCH 4/4] ppp: use for_each_set_bit_from
[not found] <1333442836-9947-1-git-send-email-akinobu.mita@gmail.com>
@ 2012-04-03 8:47 ` Akinobu Mita
0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2012-04-03 8:47 UTC (permalink / raw)
To: linux-kernel, akpm; +Cc: Akinobu Mita, Dmitry Kozlov, netdev
Use for_each_set_bit_from to iterate over all the set bit in a memory
region.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Dmitry Kozlov <xeb@mail.ru>
Cc: netdev@vger.kernel.org
---
drivers/net/ppp/pptp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
index 885dbdd..72b50f5 100644
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -116,8 +116,8 @@ static int lookup_chan_dst(u16 call_id, __be32 d_addr)
int i;
rcu_read_lock();
- for (i = find_next_bit(callid_bitmap, MAX_CALLID, 1); i < MAX_CALLID;
- i = find_next_bit(callid_bitmap, MAX_CALLID, i + 1)) {
+ i = 1;
+ for_each_set_bit_from(i, callid_bitmap, MAX_CALLID) {
sock = rcu_dereference(callid_sock[i]);
if (!sock)
continue;
--
1.7.4.4
^ permalink raw reply related [flat|nested] only message in thread