From patchwork Sat Apr 16 20:23:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8861961 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7C1519F36E for ; Sat, 16 Apr 2016 20:24:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 936BD2017E for ; Sat, 16 Apr 2016 20:24:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9803E2017D for ; Sat, 16 Apr 2016 20:24:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751785AbcDPUYf (ORCPT ); Sat, 16 Apr 2016 16:24:35 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:51116 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751574AbcDPUYf (ORCPT ); Sat, 16 Apr 2016 16:24:35 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0LyVBG-1bnDRr0wGk-015tGl; Sat, 16 Apr 2016 22:24:13 +0200 From: Arnd Bergmann To: Andrew Morton Cc: Arnd Bergmann , Steffen Klassert , Richard Cochran , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kernel/padata: hide unused functions Date: Sat, 16 Apr 2016 22:23:55 +0200 Message-Id: <1460838250-1243973-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:bG2pMyVHV7wanEGgFymTJ8tWJFG911UuWFNQGKMWE2h2mzn4gyH ko2wOvhlgocB6oh4uSUKbqmpKkB78Zlxfv+mTkiogD3XOmYL1Y8MWF0/K3D31m4RjIvTHwA k4oNcnhfhqWOpYs3JbDOfQ+CIJSnH2qAf56EvLtOF41v5JyckMD+tjvDP7+a0YSBgF+h4xM ePIFi8xe3AzPrDjs41dNQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:EyCtKMYOXD8=:98sRHyXju/yneNJNNAol4q pfD2YVXwkO0ToqXWQWU2bG9MEX5kU89sjvSSK3N7PdNCHlQc1mrbTUBa8BSyxpj6ilfEjqXpV GKj1YdxdiNwQXCW4NsrUcetu/ppx+A/u0/BKf1w2uuQ8/7dfypRHo1hknDY3azPhIlnJdVKgY v0BaF6MxNSDj00wLA4tTP188bXVGTsHDXo4QgTo2YP9ePzim9K7LI547oWYpGSx/5t2OUmLZj venbjfPiPHJsQLuNzU6SmxAhdakD8FGwnJk8xd2zo+dhjnsRBMpNLrqOZI6qj6RmSpC+YqsEV Q3SzONaeBifAKnW0jmjPKRz+Bt+y3XVZF1Nxsfbv62/ji89y+IlC3WNO7ct4MbErkguXR0dN1 wBjxOGNL98LhcHrjGJEtKR0yt2yDOBxAqQFsT3QwTONwMYtYh5XPDU3YJlhMSSTAerswAWfe0 RVTqhPmzcC6EQkbnRkT64a2P5S+K0GgONWqRqyac/hBbPmzb/cNll2VXV7oH8BgYKtM331Mf4 GyazE7QUuLtbGqCjk4FfToFEaYrXISq90dPzXutopiaRozx2gPN4KroP3X9D5/SbEogaKwpau Y3hgcWbdogwxYjnJB4L/mgJ184c8iQ+NUV4vNjd2Juaf9Hc8T3j4Fzj24+7qla4qDZL39b3s7 4HPo+Av6dTh83DBMeug1eVUapKYWjO86ydUHav+k6Fbk0ghgTiJ3nZfn4ZK/yLiOq8mo= Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A recent cleanup removed some exported functions that were not used anywhere, which in turn exposed the fact that some other functions in the same file are only used in some configurations. We now get a warning about them when CONFIG_HOTPLUG_CPU is disabled: kernel/padata.c:670:12: error: '__padata_remove_cpu' defined but not used [-Werror=unused-function] static int __padata_remove_cpu(struct padata_instance *pinst, int cpu) ^~~~~~~~~~~~~~~~~~~ kernel/padata.c:650:12: error: '__padata_add_cpu' defined but not used [-Werror=unused-function] static int __padata_add_cpu(struct padata_instance *pinst, int cpu) This rearranges the code so the __padata_remove_cpu/__padata_add_cpu functions are within the #ifdef that protects the code that calls them. Signed-off-by: Arnd Bergmann Fixes: 4ba6d78c671e ("kernel/padata.c: removed unused code") --- kernel/padata.c | 74 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/kernel/padata.c b/kernel/padata.c index 7436dd6b654c..6db4ea14fb2d 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -647,6 +647,43 @@ out: } EXPORT_SYMBOL(padata_set_cpumask); +/** + * padata_start - start the parallel processing + * + * @pinst: padata instance to start + */ +int padata_start(struct padata_instance *pinst) +{ + int err = 0; + + mutex_lock(&pinst->lock); + + if (pinst->flags & PADATA_INVALID) + err =-EINVAL; + + __padata_start(pinst); + + mutex_unlock(&pinst->lock); + + return err; +} +EXPORT_SYMBOL(padata_start); + +/** + * padata_stop - stop the parallel processing + * + * @pinst: padata instance to stop + */ +void padata_stop(struct padata_instance *pinst) +{ + mutex_lock(&pinst->lock); + __padata_stop(pinst); + mutex_unlock(&pinst->lock); +} +EXPORT_SYMBOL(padata_stop); + +#ifdef CONFIG_HOTPLUG_CPU + static int __padata_add_cpu(struct padata_instance *pinst, int cpu) { struct parallel_data *pd; @@ -691,43 +728,6 @@ static int __padata_remove_cpu(struct padata_instance *pinst, int cpu) return 0; } -/** - * padata_start - start the parallel processing - * - * @pinst: padata instance to start - */ -int padata_start(struct padata_instance *pinst) -{ - int err = 0; - - mutex_lock(&pinst->lock); - - if (pinst->flags & PADATA_INVALID) - err =-EINVAL; - - __padata_start(pinst); - - mutex_unlock(&pinst->lock); - - return err; -} -EXPORT_SYMBOL(padata_start); - -/** - * padata_stop - stop the parallel processing - * - * @pinst: padata instance to stop - */ -void padata_stop(struct padata_instance *pinst) -{ - mutex_lock(&pinst->lock); - __padata_stop(pinst); - mutex_unlock(&pinst->lock); -} -EXPORT_SYMBOL(padata_stop); - -#ifdef CONFIG_HOTPLUG_CPU - static inline int pinst_has_cpu(struct padata_instance *pinst, int cpu) { return cpumask_test_cpu(cpu, pinst->cpumask.pcpu) ||