From: Mark Brown Date: Wed, 3 Aug 2011 00:52:40 +0000 (+1000) Subject: Unless I'm very much missing something these tests are intended to check X-Git-Tag: next-20110805~1^2~63 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c6ee1730ca36cefa9f6aee41dc6f31def0563f01;p=karo-tx-linux.git Unless I'm very much missing something these tests are intended to check if bit zero is set, rather than checking if msk is entirely zero (in which case the logic would be very confusing. I haven't actually observed any runtime issues so this may be a misreading of the code on my part. Signed-off-by: Mark Brown Cc: Thomas Gleixner Signed-off-by: Andrew Morton --- diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c index 3a2cab407b93..e38544dddb18 100644 --- a/kernel/irq/generic-chip.c +++ b/kernel/irq/generic-chip.c @@ -246,7 +246,7 @@ void irq_setup_generic_chip(struct irq_chip_generic *gc, u32 msk, gc->mask_cache = irq_reg_readl(gc->reg_base + ct->regs.mask); for (i = gc->irq_base; msk; msk >>= 1, i++) { - if (!msk & 0x01) + if (!(msk & 0x01)) continue; if (flags & IRQ_GC_INIT_NESTED_LOCK) @@ -301,7 +301,7 @@ void irq_remove_generic_chip(struct irq_chip_generic *gc, u32 msk, raw_spin_unlock(&gc_lock); for (; msk; msk >>= 1, i++) { - if (!msk & 0x01) + if (!(msk & 0x01)) continue; /* Remove handler first. That will mask the irq line */