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: 102509 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp569219qge; Sat, 16 Apr 2016 13:24:36 -0700 (PDT) X-Received: by 10.98.29.208 with SMTP id d199mr20543921pfd.17.1460838276724; Sat, 16 Apr 2016 13:24:36 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si11112127pac.147.2016.04.16.13.24.36 for ; Sat, 16 Apr 2016 13:24:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org 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 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(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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) ||