From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: dmitry.kasatkin@intel.com,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] lib: mpi: Use "static inline" instead of "extern inline" in header file for __GNUC__
Date: Sun, 09 Nov 2014 17:25:27 +0800 [thread overview]
Message-ID: <545F3307.4000305@gmail.com> (raw)
In-Reply-To: <1415524261.23530.37.camel@perches.com>
On 11/09/2014 05:11 PM, Joe Perches wrote:
> On Sun, 2014-11-09 at 16:58 +0800, Chen Gang wrote:
>> In header file, "extern inline" may cause multiple definition, so need
>> change it to "static inline". And also need be quoted by __GNUC__ for
>> they are as inline functions only for __GNUC__.
> []
>> diff --git 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
>
> Why not remove the #define and use static inline
> in the 4 places the #define is currently used?
>
I just follow the original author's ways, the original author may think
it is useful.
I guess, it may be used by other systems (neither Linux kernel nor gcc).
For another compiler, it may need another syntax for it (although I am
not quite sure about it).
So for safety reason, still keep it no touch, at present.
Thanks.
--
Chen Gang
Open share and attitude like air water and life which God blessed
prev parent reply other threads:[~2014-11-09 9:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-09 8:58 [PATCH] lib: mpi: Use "static inline" instead of "extern inline" in header file for __GNUC__ Chen Gang
2014-11-09 9:11 ` Joe Perches
2014-11-09 9:25 ` Chen Gang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545F3307.4000305@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dmitry.kasatkin@intel.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.