Commit 99427747 authored by Akinobu Mita's avatar Akinobu Mita Committed by David S. Miller

ppp: use for_each_set_bit_from

Use for_each_set_bit_from to iterate over all the set bit in a memory
region.
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: Dmitry Kozlov <xeb@mail.ru>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ffe06c17
...@@ -116,8 +116,8 @@ static int lookup_chan_dst(u16 call_id, __be32 d_addr) ...@@ -116,8 +116,8 @@ static int lookup_chan_dst(u16 call_id, __be32 d_addr)
int i; int i;
rcu_read_lock(); rcu_read_lock();
for (i = find_next_bit(callid_bitmap, MAX_CALLID, 1); i < MAX_CALLID; i = 1;
i = find_next_bit(callid_bitmap, MAX_CALLID, i + 1)) { for_each_set_bit_from(i, callid_bitmap, MAX_CALLID) {
sock = rcu_dereference(callid_sock[i]); sock = rcu_dereference(callid_sock[i]);
if (!sock) if (!sock)
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment