From patchwork Fri Feb 26 12:46:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102664 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp696124lbc; Fri, 26 Feb 2016 04:47:44 -0800 (PST) X-Received: by 10.66.244.233 with SMTP id xj9mr1755906pac.19.1456490864271; Fri, 26 Feb 2016 04:47:44 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fl1si2905544pad.15.2016.02.26.04.47.44 for ; Fri, 26 Feb 2016 04:47:44 -0800 (PST) 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 S1753957AbcBZMrh (ORCPT ); Fri, 26 Feb 2016 07:47:37 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:64601 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753959AbcBZMrg (ORCPT ); Fri, 26 Feb 2016 07:47:36 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0M4mmf-1ZhkIK2AFZ-00yzZK; Fri, 26 Feb 2016 13:46:53 +0100 From: Arnd Bergmann To: Herbert Xu Cc: linux-arm-kernel@lists.infradead.org, Dmitry Kasatkin , linux-crypto@vger.kernel.org, David Howells , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] lib/mpi: use "static inline" instead of "extern inline" Date: Fri, 26 Feb 2016 13:46:27 +0100 Message-Id: <1456490794-1034544-2-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456490794-1034544-1-git-send-email-arnd@arndb.de> References: <1456490794-1034544-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:Y21+0uX/U+Vvm4r1pxCyU4qi9g9JRvce0k2/2Pi3mYY4Js0Up2p Eqglc3om4GRMNFHf2d/PODpXR6Lrs/UkeJLJZz/apNqjlgypWMuiM3HrTZE1/LFmgMB8ihQ 7X9vzsB6XJAo7ZLBX1GRPwrjcCANnYewDTOzx7xEmV8RMUF/+4aYo+NSGfbPmaqEdSM7/lf T0G/DLmiucupLetybyf4A== X-UI-Out-Filterresults: notjunk:1; V01:K0:k6ljiWo4Df4=:gNJSxOzzKHpEX0/2envsry I8nw5TQU8bos8Bd7Mq2oK02Ai4+HsxIda0xW+qyDo3Gcnkol2gVY7QjYw5WYtX5qPvjVy/Qf6 OvvCsR+e+1v+7TZhUEyvhnKFBWOwCpyM9qisB3fDvqpQCkgPyqtmQVnxi0dnFiuCndY/rXMWa I3WGcsW5KkHOUN7liHib6JhcEbDzecIAh83WZn4W2+aXYWgaOrho+Odm4gGnrs5xB8z2FCtlv 41gp+1OhHOexJjUaPYV9VFIYaxEyAXjjoZiSBiRHz50KjSok8crJGfFCdKYVyAQuFvlRYsiMA PRE9UXSEhv6qaGIGGCXX0hAVQ35sWWuU8q+rVF612/SmX9bWEyZ3DyvXBZjSblOCOolKYHUpK Z+SDJbknlPz/URaMaKKO6i7eA+SP7teMTo5clqHMPudNAQwy8Y7C7557oNMD6Rch3z1r1E5ot XDjoqpIc7N4xOz0UU1aFm3NwsBIKuYwGx2uMal4ADZHW6pCO5GX0BYvZUzR8zUjrji45eou9l JqrRkK19oJLbNXhc/2fAzGtytEpviaSBeCIhBz7CeAzcBv8Fd1pB6HM5UDVp3TFefi+OwSxn6 RiH7ZKdDbhhUoiyJoB+RwnBcPuVA4v/1CaIM+1y5/HJx7aTfUzVx1ZHalZsYZFBELq6xXVuXG Q5qwb0EfBi5gWdGYWM6fsGFosiV5ySksExsSnpEV3JN9fnkc7F6EGca7xepCZMvcKXYA= Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org When we use CONFIG_PROFILE_ALL_BRANCHES, every 'if()' introduces a static variable, but that is not allowed in 'extern inline' functions: mpi-inline.h:116:204: warning: '______f' is static but declared in inline function 'mpihelp_sub' which is not static mpi-inline.h:113:184: warning: '______f' is static but declared in inline function 'mpihelp_sub' which is not static mpi-inline.h:70:184: warning: '______f' is static but declared in inline function 'mpihelp_add' which is not static mpi-inline.h:56:204: warning: '______f' is static but declared in inline function 'mpihelp_add_1' which is not static This changes the MPI code to use 'static inline' instead, to get rid of hundreds of warnings. Signed-off-by: Arnd Bergmann --- lib/mpi/mpi-inline.h | 2 +- lib/mpi/mpi-internal.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 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/lib/mpi/mpi-inline.h b/lib/mpi/mpi-inline.h index e2b39852b30a..c245ea31f785 100644 --- a/lib/mpi/mpi-inline.h +++ b/lib/mpi/mpi-inline.h @@ -30,7 +30,7 @@ #define G10_MPI_INLINE_H #ifndef G10_MPI_INLINE_DECL -#define G10_MPI_INLINE_DECL extern inline +#define G10_MPI_INLINE_DECL static inline #endif G10_MPI_INLINE_DECL mpi_limb_t diff --git a/lib/mpi/mpi-internal.h b/lib/mpi/mpi-internal.h index c65dd1bff45a..7eceeddb3fb8 100644 --- a/lib/mpi/mpi-internal.h +++ b/lib/mpi/mpi-internal.h @@ -168,19 +168,19 @@ void mpi_rshift_limbs(MPI a, unsigned int count); int mpi_lshift_limbs(MPI a, unsigned int count); /*-- mpihelp-add.c --*/ -mpi_limb_t mpihelp_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, +static inline mpi_limb_t mpihelp_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, mpi_limb_t s2_limb); mpi_limb_t mpihelp_add_n(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_ptr_t s2_ptr, mpi_size_t size); -mpi_limb_t mpihelp_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, +static inline mpi_limb_t mpihelp_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, mpi_ptr_t s2_ptr, mpi_size_t s2_size); /*-- mpihelp-sub.c --*/ -mpi_limb_t mpihelp_sub_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, +static inline mpi_limb_t mpihelp_sub_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, mpi_limb_t s2_limb); mpi_limb_t mpihelp_sub_n(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_ptr_t s2_ptr, mpi_size_t size); -mpi_limb_t mpihelp_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, +static inline mpi_limb_t mpihelp_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size, mpi_ptr_t s2_ptr, mpi_size_t s2_size); /*-- mpihelp-cmp.c --*/