Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1505574

[PATCH] x86/apic: get rid of "warning: 'acpi_ioapic_lock' defined but not used"

From Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Newsgroups linux.kernel
Subject [PATCH] x86/apic: get rid of "warning: 'acpi_ioapic_lock' defined but not used"
Date 2016-10-21 10:50 +0200
Message-ID <suDGx-37e-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


kbuild test robot reported this against the -RT tree:

|   In file included from include/linux/mutex.h:30:0,
|                    from include/linux/notifier.h:13,
|                    from include/linux/memory_hotplug.h:6,
|                    from include/linux/mmzone.h:777,
|                    from include/linux/gfp.h:5,
|                    from include/linux/slab.h:14,
|                    from include/linux/resource_ext.h:19,
|                    from include/linux/acpi.h:26,
|                    from arch/x86/kernel/acpi/boot.c:27:
|>> 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>
---
 arch/x86/kernel/acpi/boot.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index fbd19444403f..e78f477a4ae3 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -87,7 +87,9 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
  *		->ioapic_mutex
  *			->ioapic_lock
  */
+#ifdef CONFIG_X86_IO_APIC
 static DEFINE_MUTEX(acpi_ioapic_lock);
+#endif
 
 /* --------------------------------------------------------------------------
                               Boot-time Configuration
-- 
2.9.3

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] x86/apic: get rid of "warning: 'acpi_ioapic_lock' defined but not used" Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2016-10-21 10:50 +0200
  [tip:x86/apic] x86/apic: Get rid of "warning: 'acpi_ioapic_lock'  defined but not used" tip-bot for Sebastian Andrzej Siewior <tipbot@zytor.com> - 2016-10-21 11:20 +0200

csiph-web