Re: [PATCH v2 3/6] compiler_types.h: don't #define __inline

From: Rasmus Villemoes
Date: Thu Sep 05 2019 - 05:45:46 EST


On 05/09/2019 02.13, Nick Desaulniers wrote:
> On Fri, Aug 30, 2019 at 4:15 PM Rasmus Villemoes
> <linux@xxxxxxxxxxxxxxxxxx> wrote:
>>
>
> Besides patch 1 and 2 of this series, I also see:
> Documentation/trace/tracepoint-analysis.rst
> 318: : extern __inline void
> __attribute__((__gnu_inline__, __always_inline__, _
>

That seems to be copy-pasted output from some command, so I won't edit that.

> scripts/kernel-doc
> 1574: $prototype =~ s/^__inline +//;

That one can indeed go once all uses of __inline in the source code is gone.

>> The exception is include/acpi/platform/acintel.h. However, that header
>> is only included when using the intel compiler (does anybody actually
>> build the kernel with that?), and the ACPI_INLINE macro is only used
>
> In my effort to make the kernel slightly more compiler-portable, I
> have not yet found anyone building with ICC. I would love to be
> proven wrong. Let me go ask some of my Intel friends.

Yeah, the whole compiler-attributes.h only deal with gcc and clang, and
a lot of the attributes are unconditionally defined, so I assume either
ICC implements them all, or perhaps simply ignores (unknown) attributes?
It would be lovely if we could just throw out all the icc stuff.

>> in the definition of utterly trivial stub functions, where I doubt a
>
> See:
> include/acpi/platform/acenv.h
> 146 #elif defined(__INTEL_COMPILER)
> 147 #include <acpi/platform/acintel.h>
>
>> small change of semantics (lack of __gnu_inline) changes anything.
>
> include/acpi/platform/acintel.h
> 25:#define ACPI_INLINE __inline
> include/acpi/platform/acgcc.h
> 29:#define ACPI_INLINE __inline__
>
> lol wut
>
> I mean, you just would have to change that one line in
> include/acpi/platform/acintel.h, right? I'd sign off on this patch
> with such a patch added to the series.

I'm not sure what you mean. Just switch the above __inline to inline?
It's annoying not being able to test it.

Rasmus