hpet: use for_each_set_bit()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 15 Mar 2010 04:35:01 +0000 (00:35 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Mar 2010 01:43:47 +0000 (18:43 -0700)
Replace open-coded loop with for_each_set_bit().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/hpet.c

index e481c5938badeb19c2ea9d518e9340c4dc93edd3..9c5eea3ea4deb22b7cb215184b3dd3a9b8a69152 100644 (file)
@@ -215,9 +215,7 @@ static void hpet_timer_set_irq(struct hpet_dev *devp)
        else
                v &= ~0xffff;
 
-       for (irq = find_first_bit(&v, HPET_MAX_IRQ); irq < HPET_MAX_IRQ;
-               irq = find_next_bit(&v, HPET_MAX_IRQ, 1 + irq)) {
-
+       for_each_set_bit(irq, &v, HPET_MAX_IRQ) {
                if (irq >= nr_irqs) {
                        irq = HPET_MAX_IRQ;
                        break;