[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdkDyVC02oXsTX9YYAFLw5Q+aFNWsAp911h6VdjMCYFwJQ@mail.gmail.com>
Date: Thu, 7 Jun 2018 11:51:59 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: joe@...ches.com
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Andrey Ryabinin <aryabinin@...tuozzo.com>, akataria@...are.com,
boris.ostrovsky@...cle.com, brijesh.singh@....com,
Cao jin <caoj.fnst@...fujitsu.com>,
Greg KH <gregkh@...uxfoundation.org>, hpa@...or.com,
"J. Kiszka" <jan.kiszka@...mens.com>,
jarkko.sakkinen@...ux.intel.com, jgross@...e.com,
Josh Poimboeuf <jpoimboe@...hat.com>,
kirill.shutemov@...ux.intel.com, mingo@...hat.com,
mjg59@...gle.com, Matthias Kaehlcke <mka@...omium.org>,
Philippe Ombredanne <pombredanne@...b.com>,
rostedt@...dmis.org, Thomas Gleixner <tglx@...utronix.de>,
thomas.lendacky@....com, Thiebaud Weksteen <tweek@...gle.com>,
linux-efi@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
x86@...nel.org, virtualization@...ts.linux-foundation.org,
Alistair Strachan <astrachan@...gle.com>,
Manoj Gupta <manojgupta@...gle.com>,
Greg Hackmann <ghackmann@...gle.com>, sedat.dilek@...il.com,
tstellar@...hat.com, Kees Cook <keescook@...gle.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Michal Marek <michal.lkml@...kovi.net>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
geert@...ux-m68k.org, Will Deacon <will.deacon@....com>,
mawilcox@...rosoft.com, Arnd Bergmann <arnd@...db.de>,
David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
On Thu, Jun 7, 2018 at 11:31 AM Joe Perches <joe@...ches.com> wrote:
>
> On Thu, 2018-06-07 at 10:26 -0700, Nick Desaulniers wrote:
> > I get the feeling that the use of __inline__ or __inline (vs inline)
> > in the kernel may be wrong and their use should be eradicated in the
> > follow up patch set, but it would be cool if others have additional
> > insight.
>
> __inline is easy and useful to remove as it's used in
> just a few files.
>
> But __inline__ is used in a lot of files and locations:
>
> $ git grep -w --name-only __inline__ | wc -l
> 154
> $ git grep -w __inline__ | wc -l
> 503
>
> Some of these files are used in asm includes as
> well where __inline__ may be preferred by gcc
>
> https://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate-Keywords
>
> so perhaps asm exclusions would be necessary.
Oops, just saw this email after sending v3: https://lkml.org/lkml/2018/6/7/1055
Guess I should re-add __inline__ and __inline then to 1/3?
https://lkml.org/lkml/2018/6/7/1060
ie:
+#define __inline__ __inline__ inline
instead of
+#define __inline__ inline
?
On the other hand, I was able to assemble with gcc+binutils and v3 as it stands.
Reading the link you sent, it seems more about compiling with
-pedantic or non-gnu C standards being used (I'd call that unlikely
for the kernel). So it still seems incorrect to me the use of
__inline__ (but I do appreciate the link!) at least in the kernel.
Powered by blists - more mailing lists