atm: use for_each_set_bit()
Subsystems (3)
PATCH 2/5 atm: use for_each_set_bit()
From: Akinobu Mita <[email protected]>
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]>
---
drivers/atm/lanai.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/atm/lanai.c renamed from drivers/atm/lanai.c~atm-use-for_each_set_bit +3 -4
@@ -306,11 +306,10 @@ static void vci_bitfield_iterate(struct 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: */
_
From: [email protected]
Date: Thu, 11 Mar 2010 14:07:50 -0800
Quoted 7 lines
From: Akinobu Mita <[email protected]>
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]>
Applied.