Skip to contentSkip to conversation

x86, fix defined for VECTOR_UNDEFINED and VECTOR_RETRIGGERED

PATCH In review Prarit Bhargava 2 participants 2 messages Mar 5, 2014 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, fix defined for VECTOR_UNDEFINED and VECTOR_RETRIGGERED

During another patch review, David Rientjes noted that VECTOR_UNDEFINED and VECTOR_RETRIGGERED should be defined with ()s so that they are not erroneously used in an arithmetic operation.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Seiji Aguchi <[email protected]>
Cc Yang Zhang <[email protected]>
Cc Andi Kleen <[email protected]>
Cc David Rientjes <[email protected]>
---
 arch/x86/include/asm/hw_irq.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/include/asm/hw_irq.h +2 -2
index 67d69b8..9d4dabe 100644
@@ -191,8 +191,8 @@ extern void (*__initconst interrupt[NR_VECTORS-FIRST_EXTERNAL_VECTOR])(void);
 #define trace_interrupt interrupt
 #endif
 
-#define VECTOR_UNDEFINED	-1
-#define VECTOR_RETRIGGERED	-2
+#define VECTOR_UNDEFINED	(-1)
+#define VECTOR_RETRIGGERED	(-2)
 
 typedef int vector_irq_t[NR_VECTORS];
 DECLARE_PER_CPU(vector_irq_t, vector_irq);
Signature · 1 line
1.7.9.3
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Prarit Bhargava

During another patch review, David Rientjes noted that VECTOR_UNDEFINED and VECTOR_RETRIGGERED should be defined with ()s so that they are not erroneously used in an arithmetic operation.

Quoted 9 lines
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Seiji Aguchi <[email protected]>
Cc Yang Zhang <[email protected]>
Cc Andi Kleen <[email protected]>
Cc David Rientjes <[email protected]>