Skip to content

Commit

Permalink
hpet: 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 <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>
  • Loading branch information
mita authored and torvalds committed Mar 18, 2010
1 parent c4af964 commit e5d6151
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/char/hpet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e5d6151

Please sign in to comment.