Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40765 )
Change subject: Makefile: Add is-power-of-two ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40765/1/Makefile.inc File Makefile.inc:
https://review.coreboot.org/c/coreboot/+/40765/1/Makefile.inc@162 PS1, Line 162: 0x10000000 0x20000000 0x40000000 0x80000000 Can't you just put a _Static_assert() in a C file instead of doing this? (The IS_POWER_OF_2() we have probably doesn't work in static context, but if you need that you can expand it with a __builtin_choose_expr(__builtin_constant_p()) check, similar to how we have it for MIN()/MAX().)