Commit 56ef587b authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

stable-fixup: hotplug: fix unused function warning

[resolves a messed up backport, so no matching upstream commit]

The backport of upstream commit 777c6e0d ("hotplug: Make
register and unregister notifier API symmetric") to linux-4.4.y
introduced a harmless warning in 'allnoconfig' builds as spotted by
kernelci.org:

kernel/cpu.c:226:13: warning: 'cpu_notify_nofail' defined but not used [-Wunused-function]

So far, this is the only stable tree that is affected, as linux-4.6 and
higher contain commit 98458172 ("cpu/hotplug: Split out cpu down functions")
that makes the function used in all configurations, while older longterm
releases so far don't seem to have a backport of 777c6e0d.

The fix for the warning is trivial: move the unused function back
into the #ifdef section where it was before.

Link: https://kernelci.org/build/id/586fcacb59b514049ef6c3aa/logs/
Fixes: 1c0f4e0e ("hotplug: Make register and unregister notifier API symmetric") in v4.4.y
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent acb7df23
...@@ -223,10 +223,6 @@ static int cpu_notify(unsigned long val, void *v) ...@@ -223,10 +223,6 @@ static int cpu_notify(unsigned long val, void *v)
return __cpu_notify(val, v, -1, NULL); return __cpu_notify(val, v, -1, NULL);
} }
static void cpu_notify_nofail(unsigned long val, void *v)
{
BUG_ON(cpu_notify(val, v));
}
EXPORT_SYMBOL(register_cpu_notifier); EXPORT_SYMBOL(register_cpu_notifier);
EXPORT_SYMBOL(__register_cpu_notifier); EXPORT_SYMBOL(__register_cpu_notifier);
...@@ -245,6 +241,11 @@ void __unregister_cpu_notifier(struct notifier_block *nb) ...@@ -245,6 +241,11 @@ void __unregister_cpu_notifier(struct notifier_block *nb)
EXPORT_SYMBOL(__unregister_cpu_notifier); EXPORT_SYMBOL(__unregister_cpu_notifier);
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
static void cpu_notify_nofail(unsigned long val, void *v)
{
BUG_ON(cpu_notify(val, v));
}
/** /**
* clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU * clear_tasks_mm_cpumask - Safely clear tasks' mm_cpumask for a CPU
* @cpu: a CPU id * @cpu: a CPU id
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment