Jacob Garber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32184 )
Change subject: libpayload: make log2 and clz work on signed values internally ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/32184/1/payloads/libpayload/include/libpaylo... File payloads/libpayload/include/libpayload.h:
https://review.coreboot.org/#/c/32184/1/payloads/libpayload/include/libpaylo... PS1, Line 414: static inline int log2(u32 x) { return (int)sizeof(x) * 8 - clz(x) - 1; } This could also be simplified to 32, no? (or even 31)