From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965098AbdAIKuZ (ORCPT ); Mon, 9 Jan 2017 05:50:25 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:60237 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964965AbdAIKte (ORCPT ); Mon, 9 Jan 2017 05:49:34 -0500 From: Arnd Bergmann To: stable@vger.kernel.org, Greg Kroah-Hartman Cc: Thomas Gleixner , Dan Streetman , Andrew Morton , linux-mm@kvack.org, Michal Hocko , Yu Zhao , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] stable-fixup: hotplug: fix unused function warning Date: Mon, 9 Jan 2017 11:47:50 +0100 Message-Id: <20170109104811.1453295-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:2XAak272QPCVQBf7S4dgC15elU2y7fdsNygE/p3MgA3SYC4PXvz 9L2CGseBtR3qnl0LYs/GB7MRmSYec8s/CNuXFt8jeg4G9iZ0GbYDpD/oKswgu9hJG4Ugq1/ nN0M6x9f2n85tQb+6mFdNE8oHgqjg9oG6kZRyyDTn38cY1R8HFw2e4qt7EuKu2DKWhzzJGB 1sa6Ckfs2IYxEzI61uvFw== X-UI-Out-Filterresults: notjunk:1;V01:K0:QaN5TMfeafo=:NpE5Pz1ABLoSQF6KN8amJr lqmA8rl/agDyAH2ufKp/hkoiR1aKhBRGwnx68JSf+ug7bKcmhhT+4clY7PTv5b+QQt5WGM2ie CE8vIwH7pcGo/Xq5ud1TFVlPMUYmf/hx4LFxyPqpyw29ovy9NXGx0Bt2/Foin5NR0aQCxaplm 50WdMQ3QUEC7hxe1iSZ+OzyRQczxiawueXGzSdlxvjmFMEDAx7LmC8bMjJuCpcICJgMcUvxYf UqxP4uxe/67w29xEpdxfZGg9qSOuPoSSoJrADtpwZ4ebxrSFKLggcdMakcjtxaPxQ+0vYRNJx EWfIJETFomVIUD19yCnJ8YGZKhodBXe5p5zDDOQV/dAiQ4BsswXpeVInlv5Dmm2674Oh5ZCg0 M+YpzVY4XfWN/X6hjjRgK7WNMkuEGicSqIVlghyXC3p+jJf9hNCSc1LkawVrixDu0zufU0xuJ MpfmO5yfBqRrzdyRXODi3INCzh/fawJGenFcS44zi/YuwoOaqKNrSEWNq6RPwIVq7G0fAedLk 05Kio6LiOhpX1MkJYV74yHgFr+1DCUWzUznrNEM95DDO9TaQk6TJ0Qp9JyIHP32uFMgKUzyBL QWweYehgGklwhDNkCbTK/pU5/OCqvOfQQltHjlJVhKIykz40mN4Min6hM9Sp/XMZrMbCMGPes 5ecT+ETodAOtYSHJRUUs92pwiM1RE3MNxwW2CdkuAAfzTGWKLSI5t8GlDVNTu664dTx4= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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