* [patch 2/5] atm: use for_each_set_bit()
@ 2010-03-11 22:07 akpm
2010-03-15 23:05 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2010-03-11 22:07 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, akinobu.mita, chas
From: Akinobu Mita <akinobu.mita@gmail.com>
Replace open-coded loop with for_each_set_bit().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/atm/lanai.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff -puN drivers/atm/lanai.c~atm-use-for_each_set_bit drivers/atm/lanai.c
--- a/drivers/atm/lanai.c~atm-use-for_each_set_bit
+++ a/drivers/atm/lanai.c
@@ -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: */
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 2/5] atm: use for_each_set_bit()
2010-03-11 22:07 [patch 2/5] atm: use for_each_set_bit() akpm
@ 2010-03-15 23:05 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-15 23:05 UTC (permalink / raw)
To: akpm; +Cc: netdev, akinobu.mita, chas
From: akpm@linux-foundation.org
Date: Thu, 11 Mar 2010 14:07:50 -0800
> From: Akinobu Mita <akinobu.mita@gmail.com>
>
> Replace open-coded loop with for_each_set_bit().
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Chas Williams <chas@cmf.nrl.navy.mil>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-15 23:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-11 22:07 [patch 2/5] atm: use for_each_set_bit() akpm
2010-03-15 23:05 ` 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).