stable-fixup: hotplug: fix unused function warning
Subsystems (3)
PATCH 1/1 stable-fixup: hotplug: fix unused function warning
The backport of upstream commit 777c6e0daebb ("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 984581728eb4 ("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 777c6e0daebb.
The fix for the warning is trivial: move the unused function back into the #ifdef section where it was before.
--- kernel/cpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
kernel/cpu.c +5 -4
@@ -223,10 +223,6 @@ static int cpu_notify(unsigned long val, void *v)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);
@@ -245,6 +241,11 @@ void __unregister_cpu_notifier(struct notifier_block *nb)EXPORT_SYMBOL (__unregister_cpu_notifier);#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 * @cpu: a CPU id
Signature · 7 lines
2.9.0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Patch "stable-fixup: hotplug: fix unused function warning" has been added to the 4.4-stable tree
This is a note to let you know that I've just added the patch titled
stable-fixup: hotplug: fix unused function warning
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
stable-fixup-hotplug-fix-unused-function-warning.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From [email protected] Mon Jan 9 12:26:47 2017
From: Arnd Bergmann <[email protected]>
Date: Mon, 9 Jan 2017 11:47:50 +0100
Subject: stable-fixup: hotplug: fix unused function warning
To: [email protected], Greg Kroah-Hartman <[email protected]>
Cc: Thomas Gleixner <[email protected]>, Dan Streetman <[email protected]>, Andrew Morton <[email protected]>, [email protected], Michal Hocko <[email protected]>, Yu Zhao <[email protected]>, Arnd Bergmann <[email protected]>, [email protected]
Message-ID: <[email protected]>
From: Arnd Bergmann <[email protected]>
[resolves a messed up backport, so no matching upstream commit]
The backport of upstream commit 777c6e0daebb ("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 984581728eb4 ("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 777c6e0daebb.
The fix for the warning is trivial: move the unused function back into the #ifdef section where it was before.
--- kernel/cpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
kernel/cpu.c +5 -4
@@ -223,10 +223,6 @@ static int cpu_notify(unsigned long val,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);
@@ -245,6 +241,11 @@ void __unregister_cpu_notifier(struct noEXPORT_SYMBOL (__unregister_cpu_notifier);#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 * @cpu: a CPU id
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/stable-fixup-hotplug-fix-unused-function-warning.patch
Greg Kroah-Hartman
maintainerQuoted 15 lines · Arnd Bergmann
The backport of upstream commit
777c6e0daebb("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
984581728eb4("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 of777c6e0daebb.The fix for the warning is trivial: move the unused function back into the #ifdef section where it was before.
Quoted 6 lines
Fixes 1c0f4e0ebb79 ("hotplug: Make register and unregister notifier API symmetric") in v4.4.ySigned-off-by Arnd Bergmann <[email protected]>--- kernel/cpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
Thanks for this, now applied.
greg k-h
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Arnd Bergmann
The backport of upstream commit
777c6e0daebb("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]
Is this warning really worth bothering? Does any stable rely on warning free builds?
Quoted 7 lines
So far, this is the only stable tree that is affected, as linux-4.6 and higher contain commit
984581728eb4("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 of777c6e0daebb.The fix for the warning is trivial: move the unused function back into the #ifdef section where it was before.
this looks good to me.
Quoted 37 lines
Fixes 1c0f4e0ebb79 ("hotplug: Make register and unregister notifier API symmetric") in v4.4.ySigned-off-by Arnd Bergmann <[email protected]>--- kernel/cpu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)kernel/cpu.c +5
-4@@ -223,10 +223,6 @@ static int cpu_notify(unsigned long val, void *v)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);@@ -245,6 +241,11 @@ void __unregister_cpu_notifier(struct notifier_block *nb)EXPORT_SYMBOL (__unregister_cpu_notifier);#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 * @cpu: a CPU id Signature · 1 line
2.9.0
Signature · 8 lines
Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Greg Kroah-Hartman
maintainerQuoted 10 lines · Michal Hocko
Quoted 6 lines · Arnd Bergmann
The backport of upstream commit
777c6e0daebb("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]Is this warning really worth bothering? Does any stable rely on warning free builds?
Yes, I watch it, it's a good indicator that I got a backport wrong.
thanks,
greg k-h
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>