Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758596AbcCDOQa (ORCPT ); Fri, 4 Mar 2016 09:16:30 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:55973 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755984AbcCDOQ3 (ORCPT ); Fri, 4 Mar 2016 09:16:29 -0500 From: Arnd Bergmann To: Gianfranco Costamagna Cc: linux-kernel@vger.kernel.org, trivial@kernel.org Subject: Re: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static inline" in mpi-inline.h and mpi-internal.h Date: Fri, 04 Mar 2016 15:16:05 +0100 Message-ID: <5693177.gLSTqHZso3@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <56D99351.8080601@debian.org> References: <56D99351.8080601@debian.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:zgMA0RrJalwbROgv9xPzcI9lxmQdZh0J3LvasAuZ0YgEL9jdsB8 WW0UQf1fz8xPOBNve+BVAAvbAzTK371mwsOVRcMwC8cMHHJ0XMI6DXUNcZnwrNSWNc8KzKL 7XZ/UdmtEDt2KDmk1kQ6BUN/0rzk9JyGrpC2hT1q5kq4dYyDuxQsz7yz83RaCkVV0PYqz2s yLHXVWvYMbNwFeCvryG3Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:MzhgeItKLrc=:jxV5W72iHysSZwLOXUGHdK DCgObNVlHxjTAvaD09p2HfOwlBSy9zRvctG5AExyZd7iqRGG3k4WY/UoI5XNp5z02rNC+6dSQ qOBMjw9SJ5MUXAQtc8U1SQnHbc1yiEFD2NOlhwexCNhgqoa9QggGUVvJuibilAikj2o44/fTW viz/HerpSlKfh3exqa/Cn+uqaat5ndgiWmELUAgTvtX3PU5lvF8OBSrMhg6OYhOoIukocaoYq LYGKZjU9q5HrkiL0klWuRb+N4xk32MwvKJeuTcV2VIWSiIwCScryvee4L3pqPQ3a5Ii1F9hPC qXkGJvsBfKTBGvdL2Gda/zWsIRLwihIBYVq6vT5EXPWiLF+quW0iUJnc2OXjwx6s+w9JUt1VS LLTINUwpzgW0tXfmhgpSdqU2wL04YhhMtfUvUqM233zfORnXCdMb34HyoFaP9ICuAZ0tvbQ7S mcPfhVgm0rZmv9p99I/lDm89g6Y3GWNx9hlkNyU+hRh6Us2DK3yPJyUUtIHCBVRvznJR5S4XX pvHtlqPdDOCDuNYTS8o63v4BwrWLUvXbXS1kDSNrpL7VIqdvBH5D1bZN5Z4ofeEnyln8cs7Qf AjYrmzvAKbFcTctpx1381Q/jqeSuleZtV9juiBLhMLNkThydagyMt1vPg2eceYLC21DERoxaM WLNyvXhhuokohIznwZoTn1Oa0XlrZEpvY0PV0QuAZLIno9YZ6xUZAjT/EUy9CSlqV4fF9fwHW KcIUvoWqxY592p7s Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3142 Lines: 77 On Friday 04 March 2016 14:53:21 Gianfranco Costamagna wrote: > Hi, this is my first contribution to the kernel code, I hope I did it right. Close, but not quite right. > Today I faced a gcc-5 build failure, so I fixed it (the static inline > C99 issue) > > After I found the same patch from Arnd, but I fail to see it applied to > the kernel source code. > > according to LKML [1] the patch should be already applied, but I fail to > see it in current master. It's currently in the crypto tree after Herbert Xu picked it up. It is scheduled to be merged into 4.6 at the moment. > Sending it with the format-patch style. > > > [1] https://lkml.org/lkml/2016/2/26/459 > > From 820a0ad32d474adf925437811e9b61d9d8886bc9 Mon Sep 17 00:00:00 2001 > From: Gianfranco Costamagna > Date: Fri, 4 Mar 2016 14:16:24 +0100 > Subject: [PATCH] ARM: LLVMLinux: Change "extern inline" to "static > inline" in > mpi-inline.h and mpi-internal.h The mail is not formatted in a way that allows being imported with 'git am'. The best way to do this right is to use the headers as they come from git format-patch directly, and start the mail with the changelog text (and with a From: line before that). > With compilers which follow the C99 standard (like modern versions of > gcc and > clang), "extern inline" does the wrong thing (emits code for an externally > linkable version of the inline function). "static inline" is the correct > choice > instead. > > Signed-off-by: Arnd Bergmann > Signed-off-by: Gianfranco Costamagna > Signed-off-by: Gianfranco Costamagna Here you have kept my Signed-off-by line, but not the author attribution. This is easy to get wrong. You probably want to change the author field using 'git commit --amend --author="Arnd Bergmann "', which will cause the correct From: line to show up when exporting it with git send-email. > index c65dd1b..1baca30 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 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 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); You have marked the function as 'static' here, rather than 'static inline' as I did in my patch. I think my version is better here, because it matches the definition of the function, and because declaring a function as 'static' in a header file is generally a bad idea: you will get a build warning or error if the header is included in a file that does not provide a definition. Arnd