Subject: linux-next: build failure after merge of the mm tree

From: Stephen Rothwell <[email-masked]>
Date: Wed, 4 Oct 2023 09:50:58 +1100

Hi all,

After merging the mm tree, today's linux-next build (native perf) failed
like this:

In file included from tools/include/linux/bits.h:21,
                 from tools/include/linux/bitops.h:14,
                 from tools/include/linux/bitmap.h:6,
                 from tools/perf/util/header.h:10,
                 from /home/sfr/next/perf/pmu-events/pmu-events.c:3:
tools/include/linux/find.h: In function 'find_next_bit':
tools/include/linux/bits.h:24:17: error: implicit declaration of function '__is_constexpr' [-Werror=implicit-function-declaration]
   24 |                 __is_constexpr((l) > (h)), (l) > (h), 0)))
      |                 ^~~~~~~~~~~~~~
tools/include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
tools/include/linux/bits.h:37:10: note: in expansion of macro 'GENMASK_INPUT_CHECK'
   37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
tools/include/linux/find.h:42:31: note: in expansion of macro 'GENMASK'
   42 |                 val = *addr & GENMASK(size - 1, offset);
      |                               ^~~~~~~
tools/include/linux/bits.h:23:28: error: first argument to '__builtin_choose_expr' not a constant
   23 |         (BUILD_BUG_ON_ZERO(__builtin_choose_expr( \
      |                            ^~~~~~~~~~~~~~~~~~~~~
tools/include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_ON_ZERO'
   16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
      |                                                              ^
tools/include/linux/bits.h:37:10: note: in expansion of macro 'GENMASK_INPUT_CHECK'
   37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
      |          ^~~~~~~~~~~~~~~~~~~
tools/include/linux/find.h:42:31: note: in expansion of macro 'GENMASK'
   42 |                 val = *addr & GENMASK(size - 1, offset);
      |                               ^~~~~~~

... and much more ...

Caused by commit

  5bee02eadb5d ("compiler.h: move __is_constexpr() to compiler.h")

I have reverted that commit for today.

-- 
Cheers,
Stephen Rothwell