* Patch "stable-fixup: hotplug: fix unused function warning" has been added to the 4.4-stable tree
2017-01-09 10:47 [PATCH] stable-fixup: hotplug: fix unused function warning Arnd Bergmann
@ 2017-01-09 11:27 ` gregkh
2017-01-09 11:28 ` [PATCH] stable-fixup: hotplug: fix unused function warning Greg Kroah-Hartman
2017-01-09 11:29 ` Michal Hocko
2 siblings, 0 replies; 5+ messages in thread
From: gregkh @ 2017-01-09 11:27 UTC (permalink / raw)
To: arnd, akpm, ddstreet, gregkh, mhocko, tglx, yuzhao; +Cc: stable, stable-commits
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 <stable@vger.kernel.org> know about it.
>From arnd@arndb.de Mon Jan 9 12:26:47 2017
From: Arnd Bergmann <arnd@arndb.de>
Date: Mon, 9 Jan 2017 11:47:50 +0100
Subject: stable-fixup: hotplug: fix unused function warning
To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, Dan Streetman <ddstreet@ieee.org>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, Michal Hocko <mhocko@suse.com>, Yu Zhao <yuzhao@google.com>, Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Message-ID: <20170109104811.1453295-1-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
[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.
Link: https://kernelci.org/build/id/586fcacb59b514049ef6c3aa/logs/
Fixes: 1c0f4e0ebb79 ("hotplug: Make register and unregister notifier API symmetric") in v4.4.y
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/cpu.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -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 no
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
Patches currently in stable-queue which might be from arnd@arndb.de are
queue-4.4/stable-fixup-hotplug-fix-unused-function-warning.patch
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] stable-fixup: hotplug: fix unused function warning
2017-01-09 10:47 [PATCH] stable-fixup: hotplug: fix unused function warning Arnd Bergmann
2017-01-09 11:27 ` Patch "stable-fixup: hotplug: fix unused function warning" has been added to the 4.4-stable tree gregkh
@ 2017-01-09 11:28 ` Greg Kroah-Hartman
2017-01-09 11:29 ` Michal Hocko
2 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-09 11:28 UTC (permalink / raw)
To: Arnd Bergmann
Cc: stable, Thomas Gleixner, Dan Streetman, Andrew Morton, linux-mm,
Michal Hocko, Yu Zhao, linux-kernel
On Mon, Jan 09, 2017 at 11:47:50AM +0100, Arnd Bergmann wrote:
> 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.
>
> Link: https://kernelci.org/build/id/586fcacb59b514049ef6c3aa/logs/
> Fixes: 1c0f4e0ebb79 ("hotplug: Make register and unregister notifier API symmetric") in v4.4.y
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> 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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] stable-fixup: hotplug: fix unused function warning
2017-01-09 10:47 [PATCH] stable-fixup: hotplug: fix unused function warning Arnd Bergmann
2017-01-09 11:27 ` Patch "stable-fixup: hotplug: fix unused function warning" has been added to the 4.4-stable tree gregkh
2017-01-09 11:28 ` [PATCH] stable-fixup: hotplug: fix unused function warning Greg Kroah-Hartman
@ 2017-01-09 11:29 ` Michal Hocko
2017-01-09 11:47 ` Greg Kroah-Hartman
2 siblings, 1 reply; 5+ messages in thread
From: Michal Hocko @ 2017-01-09 11:29 UTC (permalink / raw)
To: Arnd Bergmann
Cc: stable, Greg Kroah-Hartman, Thomas Gleixner, Dan Streetman,
Andrew Morton, linux-mm, Yu Zhao, linux-kernel
On Mon 09-01-17 11:47:50, Arnd Bergmann wrote:
> 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?
> 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.
this looks good to me.
> Link: https://kernelci.org/build/id/586fcacb59b514049ef6c3aa/logs/
> Fixes: 1c0f4e0ebb79 ("hotplug: Make register and unregister notifier API symmetric") in v4.4.y
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> kernel/cpu.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index cd6d1258554e..40d20bf5de28 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -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
> --
> 2.9.0
>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] stable-fixup: hotplug: fix unused function warning
2017-01-09 11:29 ` Michal Hocko
@ 2017-01-09 11:47 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2017-01-09 11:47 UTC (permalink / raw)
To: Michal Hocko
Cc: Arnd Bergmann, stable, Thomas Gleixner, Dan Streetman,
Andrew Morton, linux-mm, Yu Zhao, linux-kernel
On Mon, Jan 09, 2017 at 12:29:18PM +0100, Michal Hocko wrote:
> On Mon 09-01-17 11:47:50, Arnd Bergmann wrote:
> > 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 majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread