Files
Linux/include/linux
Rikard Falkeborn f747e6667e linux/bits.h: fix compilation error with GENMASK
GENMASK() has an input check which uses __builtin_choose_expr() to
enable a compile time sanity check of its inputs if they are known at
compile time.

However, it turns out that __builtin_constant_p() does not always return
a compile time constant [0].  It was thought this problem was fixed with
gcc 4.9 [1], but apparently this is not the case [2].

Switch to use __is_constexpr() instead which always returns a compile time
constant, regardless of its inputs.

Link: https://lore.kernel.org/lkml/[email protected] [0]
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449 [1]
Link: https://lore.kernel.org/lkml/[email protected] [2]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Rikard Falkeborn <[email protected]>
Reported-by: Tetsuo Handa <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Yury Norov <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2021-05-22 15:09:07 -10:00
..
2021-04-22 09:26:22 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-05-06 19:24:11 -07:00
…
…
2021-04-14 16:30:30 +03:00
…
…
…
…
…
…
…
…
…
…
…
…
2021-05-08 21:49:48 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-04-08 16:04:20 -07:00
…
…
…
…
…
2021-04-08 16:04:20 -07:00
2021-04-08 16:04:20 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-05-06 19:24:11 -07:00
…
…
…
…
…
…
…
…
2021-04-19 13:13:26 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-03-22 03:57:39 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-04-12 15:04:23 +02:00
2021-03-30 22:37:06 +02:00
…
…
…
…
2021-05-07 00:26:34 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-04-08 16:04:20 -07:00
…
…
2021-04-30 11:20:40 -07:00
…
…
…
…
…
…
…
…
…
…
2021-03-22 04:23:14 +01:00
…
…
…
2021-04-05 22:39:38 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-05-14 19:41:32 -07:00
…
…
2021-04-08 16:04:20 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-04-06 08:34:39 +02:00
…
…
…
…
…
…
…
…
…
…
…
2021-04-21 10:24:41 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-03-06 12:40:22 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-03-17 14:16:15 -05:00
…
…
…
2021-03-22 02:45:52 +01:00
…
…
…
…
…
…
…
…
2021-03-18 12:58:27 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-05-06 19:24:11 -07:00
…
2021-03-19 04:58:25 +00:00
…
…
2021-03-25 17:39:33 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-03-10 09:34:06 +01:00
2021-04-15 10:32:17 +02:00
…
…
…
2021-03-30 17:06:49 -07:00
…
2021-04-26 22:55:12 +01:00
…
…
…
…
2021-04-09 16:00:00 +02:00
…
…
…
…
…
2021-03-22 15:02:14 +01:00
…
…
…
2021-05-07 00:26:35 -07:00
…
…
…
…
…
…
…
…
2021-04-16 15:31:02 -07:00
2021-03-30 13:42:33 -04:00
…
…
…
…
…
…
…
…
…
…
…