Skip to contentSkip to conversation

genirq: Fix missing parenthesises in generic-chip

PATCH New Mark Brown 1 participant 1 message Jun 2, 2011 IRQ

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 genirq: Fix missing parenthesises in generic-chip

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.

---
 kernel/irq/generic-chip.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/irq/generic-chip.c +2 -2
index 31a9db7..7872a5d 100644
@@ -232,7 +232,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)
@@ -287,7 +287,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 */
Signature · 1 line
1.7.5.3