]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Warning fix for i386 io apic
authorArnaud S. Launay <asl@launay.org>
Mon, 15 Jul 2002 05:57:44 +0000 (22:57 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Mon, 15 Jul 2002 05:57:44 +0000 (22:57 -0700)
  Patch enclosed to correct the following warning in 2.5.20.

  io_apic.c:223: warning: `move' defined but not used

  I discussed it with Rusty, so I extended the SMP part and
  declared a null function for UP (my first thought was to #ifdef
  balance_irq() ).

arch/i386/kernel/io_apic.c

index 8ae4bb7bf9b2b9c7d4bcdbe86c40a975c6482ff8..d09e00d867da3ba635a7ddb7fb7598d64836252d 100644 (file)
@@ -219,6 +219,7 @@ extern unsigned long irq_affinity [NR_IRQS];
 #define IRQ_ALLOWED(cpu,allowed_mask) \
                ((1 << cpu) & (allowed_mask))
 
+#if CONFIG_SMP
 static unsigned long move(int curr_cpu, unsigned long allowed_mask, unsigned long now, int direction)
 {
        int search_idle = 1;
@@ -247,7 +248,6 @@ inside:
 
 static inline void balance_irq(int irq)
 {
-#if CONFIG_SMP
        irq_balance_t *entry = irq_balance + irq;
        unsigned long now = jiffies;
 
@@ -263,8 +263,10 @@ static inline void balance_irq(int irq)
                entry->cpu = move(entry->cpu, allowed_mask, now, random_number);
                set_ioapic_affinity(irq, 1 << entry->cpu);
        }
-#endif
 }
+#else /* !SMP */
+static inline void balance_irq(int irq) { }
+#endif
 
 /*
  * support for broken MP BIOSs, enables hand-redirection of PIRQ0-7 to