[PATCH] arm: incorrect use of "&&" instead of "&"

From: Willy Tarreau
Date: Sat Nov 25 2006 - 16:00:12 EST


In integrator_init_irq(), the use of "&&" in the following
statement causes all interrupts to be marked valid regardless
of INTEGRATOR_SC_VALID_INT, as long as it's non-zero :

if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0)

Obvious fix is to replace it with "&". This was already fixed
in 2.6.

Signed-off-by: Willy Tarreau <w@xxxxxx>
---
arch/arm/mach-integrator/irq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-integrator/irq.c b/arch/arm/mach-integrator/irq.c
index 69d2e67..cc56534 100644
--- a/arch/arm/mach-integrator/irq.c
+++ b/arch/arm/mach-integrator/irq.c
@@ -55,7 +55,7 @@ void __init integrator_init_irq(void)
unsigned int i;

for (i = 0; i < NR_IRQS; i++) {
- if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0) {
+ if (((1 << i) & INTEGRATOR_SC_VALID_INT) != 0) {
irq_desc[i].valid = 1;
irq_desc[i].probe_ok = 1;
irq_desc[i].mask_ack = sc_mask_irq;
--
1.4.2.4

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/