path: root/lib
diff options
authorRikard Falkeborn <>2021-05-22 17:42:02 -0700
committerLinus Torvalds <>2021-05-22 15:09:07 -1000
commitf747e6667ebb2ffb8133486c9cd19800d72b0d98 (patch)
treeda4178160dfb6592c2a37f9eed45b391b5a47e9f /lib
parent0f90b88dbcd1143e0f408502eba0af97429c502a (diff)
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: [0] Link: [1] Link: [2] Link: Signed-off-by: Rikard Falkeborn <> Reported-by: Tetsuo Handa <> Acked-by: Arnd Bergmann <> Reviewed-by: Andy Shevchenko <> Cc: Ard Biesheuvel <> Cc: Yury Norov <> Cc: Peter Zijlstra <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions