Skip to content

Commit

Permalink
atm: use for_each_set_bit()
Browse files Browse the repository at this point in the history
Replace open-coded loop with for_each_set_bit().

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Chas Williams <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
mita authored and davem330 committed Mar 15, 2010
1 parent a1ca14a commit d287d66
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/atm/lanai.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,10 @@ static void vci_bitfield_iterate(struct lanai_dev *lanai,
const unsigned long *lp,
void (*func)(struct lanai_dev *,vci_t vci))
{
vci_t vci = find_first_bit(lp, NUM_VCI);
while (vci < NUM_VCI) {
vci_t vci;

for_each_set_bit(vci, lp, NUM_VCI)
func(lanai, vci);
vci = find_next_bit(lp, NUM_VCI, vci + 1);
}
}

/* -------------------- BUFFER UTILITIES: */
Expand Down

0 comments on commit d287d66

Please sign in to comment.