Skip to contentSkip to conversation

x86, irq Fix kbuild warning in smp_irq_move_cleanup_interrupt()

PATCH New Prarit Bhargava 2 participants 2 messages Jan 13, 2014 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, irq Fix kbuild warning in smp_irq_move_cleanup_interrupt()

kbuild, 0day kernel build service, outputs the warning:

arch/x86/kernel/apic/io_apic.c:2211 smp_irq_move_cleanup_interrupt() warn:
always true condition '(irq <= -1) => (0-u32max <= (-1))'

because irq is defined as an unsigned int instead of an int. Fix this trivial error by redefining irq as a signed int. The remaining consumers of the int are okay.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Fengguang Wu <[email protected]>
---
 arch/x86/kernel/apic/io_apic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/apic/io_apic.c +1 -1
index e63a5bd..c4db751 100644
@@ -2202,7 +2202,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
 
 	me = smp_processor_id();
 	for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
-		unsigned int irq;
+		int irq;
 		unsigned int irr;
 		struct irq_desc *desc;
 		struct irq_cfg *cfg;
Signature · 1 line
1.7.9.3
#1 lore raw

[tip:irq/core] x86/irq: Fix kbuild warning in smp_irq_move_cleanup_interrupt()

x86/irq: Fix kbuild warning in smp_irq_move_cleanup_interrupt()
Commit-ID:  c7a730fa4624092e2d1c0cb7b750816e87c32364
Gitweb:     http://git.kernel.org/tip/c7a730fa4624092e2d1c0cb7b750816e87c32364
Author:     Prarit Bhargava <[email protected]>
AuthorDate: Mon, 13 Jan 2014 08:40:20 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Mon, 13 Jan 2014 15:08:37 +0100

x86/irq: Fix kbuild warning in smp_irq_move_cleanup_interrupt()

Fengguang Wu's 0day kernel build service reported the following build warning:

arch/x86/kernel/apic/io_apic.c:2211
smp_irq_move_cleanup_interrupt() warn: always true condition '(irq <= -1) => (0-u32max <= (-1))'

because irq is defined as an unsigned int instead of an int. Fix this trivial error by redefining irq as a signed int. The remaining consumers of the int are okay.

Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Sebastian Andrzej Siewior <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Fengguang Wu <[email protected]>
---
 arch/x86/kernel/apic/io_apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/apic/io_apic.c +1 -1
index 6df0b66..a43f068 100644
@@ -2202,7 +2202,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
 
 	me = smp_processor_id();
 	for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
-		unsigned int irq;
+		int irq;
 		unsigned int irr;
 		struct irq_desc *desc;
 		struct irq_cfg *cfg;