linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Eli Friedman <efriedma@codeaurora.org>,
	Christopher Li <sparse@chrisli.org>,
	Kees Cook <keescook@chromium.org>, Ingo Molnar <mingo@kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Dominique Martinet <asmadeus@codewreck.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] include/linux/compiler*.h: Use feature checking instead of version checks for attributes
Date: Mon, 27 Aug 2018 14:33:12 +0200	[thread overview]
Message-ID: <CANiq72n=WrLWD1-hq2z1gNPJViRoLvveq9xfw6Ndnj0S4Mp3eg@mail.gmail.com> (raw)
In-Reply-To: <6c81222980f0f81732726b405df6dbf2b8f98844.camel@perches.com>

Hi Joe,

On Sun, Aug 26, 2018 at 8:50 PM, Joe Perches <joe@perches.com> wrote:
> On Sun, 2018-08-26 at 19:57 +0200, Miguel Ojeda wrote:
>> Instead of using version checks per-compiler to define (or not) each attribute,
>> use __has_attribute to test for them, following the cleanup started with
>> commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive").
>
> Very nice.  Thank you Miguel.

Thanks!

>
> trivia:
>
> I believe the alphabetic sorting of the required attributes
> makes reading by use a bit difficult and I would prefer that
> various required attributes are sorted by logical use instead.
>
> ie:  keep noinline and __always_inline together,
>      keep __used and __always_unused together,
>      etc...
>
>

Both ways are fine with me --- I sorted them as an attempt to avoid
the file evolving into a mess again in the upcoming years :-)

Half-joking: it may also be a good way to avoid people "guessing" what
the attributes do by name and, instead, consulting the docs (either
the compiler's, or a Doc/ file maybe).

Cheers,
Miguel

  reply	other threads:[~2018-08-27 12:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-26 17:57 [PATCH] include/linux/compiler*.h: Use feature checking instead of version checks for attributes Miguel Ojeda
2018-08-26 18:30 ` Miguel Ojeda
2018-08-26 18:50 ` Joe Perches
2018-08-27 12:33   ` Miguel Ojeda [this message]
2018-08-27 17:43 ` Nick Desaulniers
2018-08-27 17:48   ` Nick Desaulniers
2018-08-28 15:10     ` Miguel Ojeda
2018-08-28 17:05       ` Nick Desaulniers
2018-08-28 20:33         ` Miguel Ojeda
2018-08-28 15:03   ` Miguel Ojeda
2018-08-28 16:53     ` Nick Desaulniers
2018-08-28 20:41       ` Miguel Ojeda

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='CANiq72n=WrLWD1-hq2z1gNPJViRoLvveq9xfw6Ndnj0S4Mp3eg@mail.gmail.com' \
    --to=miguel.ojeda.sandonis@gmail.com \
    --cc=arnd@arndb.de \
    --cc=asmadeus@codewreck.org \
    --cc=efriedma@codeaurora.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=sparse@chrisli.org \
    --cc=torvalds@linux-foundation.org \
    --cc=yamada.masahiro@socionext.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).