linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: Miguel Ojeda <ojeda@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org,  mm-commits@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] MM updates for 6.14-rc1
Date: Sun, 26 Jan 2025 16:08:26 -0800	[thread overview]
Message-ID: <CAHk-=wg_e8=SasMy7j3oHpkWXSE1gDsUoXC8p=+N=9zd5VE1Jg@mail.gmail.com> (raw)
In-Reply-To: <CAFULd4aDuPA3rig9BzD_P1Y62S0Y5Yv_8AxpjtwTddv4OPNoHg@mail.gmail.com>

On Sun, 26 Jan 2025 at 15:27, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> The detection is put in include/linux/compiler.h where we can
> consolidate checks for both compilers:

No. Please. We have compiler-specific header files for a reason.
Exactly so that we do *not* need to have disgusting tests like

  #if ((defined(__GNUC__) && __GNUC__ >= 14) ||        \
       (defined(__clang__) && __clang_major__ >= 19)) &&    \
      !defined(__CHECKER__)

and instead it should just be

  #define CC_HAS_TYPEOF_UNQUAL (__clang_major__ >= 19)

in compiler-clang.h, and

  #define CC_HAS_TYPEOF_UNQUAL (__GNUC__ >= 14)

in compiler-gcc.h.

And then in the actual compiler.h, we could do

  #define USE_TYPEOF_UNQUAL (CC_HAS_TYPEOF_UNQUAL && !defined(__CHECKER__))

and now the places that then want to use __typeof_unqual__ have a very
straightforward way to check if they should do so.

             Linus


  reply	other threads:[~2025-01-27  0:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-25  0:22 Andrew Morton
2025-01-25 22:09 ` Linus Torvalds
2025-01-26  5:00   ` Andrew Morton
2025-01-26  7:34     ` Linus Torvalds
2025-01-26  8:27     ` Stephen Rothwell
2025-01-26 12:10     ` Uros Bizjak
2025-01-26  9:57   ` Uros Bizjak
2025-01-26 17:21     ` Uros Bizjak
2025-01-26 18:29       ` Linus Torvalds
2025-01-26 19:46         ` Uros Bizjak
2025-01-26 20:06           ` Uros Bizjak
2025-01-26 21:59           ` Linus Torvalds
2025-01-26 23:27             ` Uros Bizjak
2025-01-27  0:08               ` Linus Torvalds [this message]
2025-01-27  7:29                 ` Uros Bizjak
2025-01-26 20:28         ` Miguel Ojeda
2025-01-26 21:19           ` Matthew Wilcox
2025-01-26 21:35             ` Miguel Ojeda
2025-01-26 20:58         ` Miguel Ojeda
2025-01-29 20:10           ` John Hubbard

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='CAHk-=wg_e8=SasMy7j3oHpkWXSE1gDsUoXC8p=+N=9zd5VE1Jg@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=ubizjak@gmail.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