]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0364-x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
rt_patches: required rebase due to printk change
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0364-x86-apic-get-rid-of-warning-acpi_ioapic_lock-defined.patch
1 From 8a7ce2cb5c7971826fb93362e2562224d9d5b205 Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Fri, 21 Oct 2016 10:29:11 +0200
4 Subject: [PATCH 364/366] x86/apic: get rid of "warning: 'acpi_ioapic_lock'
5  defined but not used"
6
7 kbuild test robot reported this against the -RT tree:
8
9 |   In file included from include/linux/mutex.h:30:0,
10 |                    from include/linux/notifier.h:13,
11 |                    from include/linux/memory_hotplug.h:6,
12 |                    from include/linux/mmzone.h:777,
13 |                    from include/linux/gfp.h:5,
14 |                    from include/linux/slab.h:14,
15 |                    from include/linux/resource_ext.h:19,
16 |                    from include/linux/acpi.h:26,
17 |                    from arch/x86/kernel/acpi/boot.c:27:
18 |>> arch/x86/kernel/acpi/boot.c:90:21: warning: 'acpi_ioapic_lock' defined but not used [-Wunused-variable]
19 |    static DEFINE_MUTEX(acpi_ioapic_lock);
20 |                        ^
21 |   include/linux/mutex_rt.h:27:15: note: in definition of macro 'DEFINE_MUTEX'
22 |     struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
23                   ^~~~~~~~~
24 which is also true (as in non-used) for !RT but the compiler does not
25 emit a warning.
26
27 Reported-by: kbuild test robot <fengguang.wu@intel.com>
28 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
29 Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
30 ---
31  arch/x86/kernel/acpi/boot.c | 2 ++
32  1 file changed, 2 insertions(+)
33
34 diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
35 index e759076..a29fc4f 100644
36 --- a/arch/x86/kernel/acpi/boot.c
37 +++ b/arch/x86/kernel/acpi/boot.c
38 @@ -87,7 +87,9 @@ static u64 acpi_lapic_addr __initdata = APIC_DEFAULT_PHYS_BASE;
39   *             ->ioapic_mutex
40   *                     ->ioapic_lock
41   */
42 +#ifdef CONFIG_X86_IO_APIC
43  static DEFINE_MUTEX(acpi_ioapic_lock);
44 +#endif
45  
46  /* --------------------------------------------------------------------------
47                                Boot-time Configuration
48 -- 
49 1.9.1
50