hpet: use for_each_set_bit()
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>
This commit is contained in:
parent
c4af96449e
commit
e5d6151115
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue