x86/apic: Get rid of "warning: 'acpi_ioapic_lock' defined but not used"
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 21 Oct 2016 08:44:49 +0000 (10:44 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 21 Oct 2016 09:09:14 +0000 (11:09 +0200)
kbuild test robot reported this against the -RT tree:

|>> arch/x86/kernel/acpi/boot.c:90:21: warning: 'acpi_ioapic_lock' defined but not used [-Wunused-variable]
|    static DEFINE_MUTEX(acpi_ioapic_lock);
|                        ^
|   include/linux/mutex_rt.h:27:15: note: in definition of macro 'DEFINE_MUTEX'
|     struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
                  ^~~~~~~~~
which is also true (as in non-used) for !RT but the compiler does not
emit a warning.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20161021084449.32523-1-bigeasy@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/acpi/boot.c

index 8a5abaa7d4533e1592bc6977569c737762089516..066ceb7767b864e9e81ba2dcfe3bfd35012b7205 100644 (file)
@@ -76,6 +76,7 @@ int acpi_fix_pin2_polarity __initdata;
 static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
 #endif
 
+#ifdef CONFIG_X86_IO_APIC
 /*
  * Locks related to IOAPIC hotplug
  * Hotplug side:
@@ -88,6 +89,7 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
  *                     ->ioapic_lock
  */
 static DEFINE_MUTEX(acpi_ioapic_lock);
+#endif
 
 /* --------------------------------------------------------------------------
                               Boot-time Configuration