From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754014AbcBZMri (ORCPT ); Fri, 26 Feb 2016 07:47:38 -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 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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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(-) 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 --*/ -- 2.7.0