Skip to contentSkip to conversation

Fix warning in do_IRQ (i386)

PATCH In review Jean Delvare 2 participants 2 messages Jun 26, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix warning in do_IRQ (i386)

arch/i386/kernel/irq.c: In function `do_IRQ':
arch/i386/kernel/irq.c:104: warning: suggest parentheses around arithmetic in operand of |

Cc Björn Steinbrink <[email protected]>
Cc Arjan van de Ven <[email protected]>
---
 arch/i386/kernel/irq.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/i386/kernel/irq.c +2 -2
@@ -100,8 +100,8 @@
 		 * 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"
Signature · 1 line
Jean Delvare
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Jean Delvare

arch/i386/kernel/irq.c: In function `do_IRQ':
arch/i386/kernel/irq.c:104: warning: suggest parentheses around arithmetic in operand of |

Cc Björn Steinbrink <[email protected]>
Cc Arjan van de Ven <[email protected]>
---
 arch/i386/kernel/irq.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

arch/i386/kernel/irq.c line 107

Quoted 10 lines
arch/i386/kernel/irq.c +2 -2
@@ -100,8 +100,8 @@
 		 * 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"

Hi,

thanks for catching that one, I even fixed that on the box where the patch was tested but then obviously sent the old patch.