linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Yury Norov <yury.norov@gmail.com>,
	linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Subject: Re: [PATCH] linux/bits.h: Fix compilation error with GENMASK
Date: Thu, 20 May 2021 13:41:12 -0700	[thread overview]
Message-ID: <20210520134112.ee15f156f1b7dbd3d8f16471@linux-foundation.org> (raw)
In-Reply-To: <20210511203716.117010-1-rikard.falkeborn@gmail.com>

On Tue, 11 May 2021 22:37:15 +0200 Rikard Falkeborn <rikard.falkeborn@gmail.com> wrote:

> --- a/include/linux/const.h
> +++ b/include/linux/const.h
> @@ -3,4 +3,12 @@
>  
>  #include <vdso/const.h>
>  
> +/*
> + * This returns a constant expression while determining if an argument is
> + * a constant expression, most importantly without evaluating the argument.
> + * Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de>
> + */
> +#define __is_constexpr(x) \
> +	(sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))

Boggle.

Could someone please sometime enhance that comment a bit?  What need
does this thing satisfy and how on earth does it work?


  parent reply	other threads:[~2021-05-20 20:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 20:37 [PATCH] linux/bits.h: Fix compilation error with GENMASK Rikard Falkeborn
2021-05-12 12:53 ` Ard Biesheuvel
2021-05-20 18:46   ` Rikard Falkeborn
2021-05-20 19:44     ` Yury Norov
2021-05-20 20:15       ` Arnd Bergmann
2021-05-20 20:41 ` Andrew Morton [this message]
2021-05-21 11:59   ` Andy Shevchenko
2021-05-21 10:15 ` Andy Shevchenko

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=20210520134112.ee15f156f1b7dbd3d8f16471@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=ardb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=peterz@infradead.org \
    --cc=rikard.falkeborn@gmail.com \
    --cc=yury.norov@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;
as well as URLs for NNTP newsgroup(s).