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: 8436691 Return-Path: X-Original-To: patchwork-linux-arm@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 157429F314 for ; Fri, 26 Feb 2016 12:49:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 28D5E20221 for ; Fri, 26 Feb 2016 12:49:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 461FB20395 for ; Fri, 26 Feb 2016 12:49:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZHo5-0003wQ-8z; Fri, 26 Feb 2016 12:47:41 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZHnq-0003Yn-VX for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2016 12:47:28 +0000 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 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= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160226_044727_590727_E46E9B9C X-CRM114-Status: GOOD ( 12.12 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, David Howells , Dmitry Kasatkin , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 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 --*/