From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754841AbcJUIpD (ORCPT ); Fri, 21 Oct 2016 04:45:03 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:50996 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754366AbcJUIpA (ORCPT ); Fri, 21 Oct 2016 04:45:00 -0400 From: Sebastian Andrzej Siewior To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Sebastian Andrzej Siewior Subject: [PATCH] x86/apic: get rid of "warning: 'acpi_ioapic_lock' defined but not used" Date: Fri, 21 Oct 2016 10:44:49 +0200 Message-Id: <20161021084449.32523-1-bigeasy@linutronix.de> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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_MU= TEX' | struct mutex mutexname =3D __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 Signed-off-by: Sebastian Andrzej Siewior --- 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 =3D APIC_DEFAULT_PH= YS_BASE; * ->ioapic_mutex * ->ioapic_lock */ +#ifdef CONFIG_X86_IO_APIC static DEFINE_MUTEX(acpi_ioapic_lock); +#endif =20 /* -----------------------------------------------------------------------= --- Boot-time Configuration --=20 2.9.3