[patch] irq: fix arch/i386/kernel/irq.c gcc warning

From: Ingo Molnar
Date: Tue Jun 27 2006 - 05:31:15 EST



* Andrew Morton <akpm@xxxxxxxx> wrote:

> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17/2.6.17-mm3/

> Changes since 2.6.17-mm2:
>
> origin.patch

upstream grew a new compiler warning in i386 irq.c. Patch below fixes
it. No change in resulting irq.o code.

Ingo

-------------
Subject: irq: fix arch/i386/kernel/irq.c gcc warning
From: Ingo Molnar <mingo@xxxxxxx>

add parantheses. (code was fine because & has a higher precedence than |,
but it's a dangerous construct in general and gcc also emits a warning)

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/i386/kernel/irq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/arch/i386/kernel/irq.c
===================================================================
--- linux.orig/arch/i386/kernel/irq.c
+++ linux/arch/i386/kernel/irq.c
@@ -104,8 +104,8 @@ fastcall unsigned int do_IRQ(struct pt_r
* softirq checks work in the hardirq context.
*/
irqctx->tinfo.preempt_count =
- irqctx->tinfo.preempt_count & ~SOFTIRQ_MASK |
- curctx->tinfo.preempt_count & SOFTIRQ_MASK;
+ (irqctx->tinfo.preempt_count & ~SOFTIRQ_MASK) |
+ (curctx->tinfo.preempt_count & SOFTIRQ_MASK);

asm volatile(
" xchgl %%ebx,%%esp \n"
-
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/