Attention is currently required from: Hung-Te Lin, Shelley Chen, Paul Menzel, Jianjun Wang. Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59738 )
Change subject: lib: Add fls() (Find Last Set) ......................................................................
Patch Set 4: Code-Review+1
(2 comments)
File src/commonlib/bsd/include/commonlib/bsd/helpers.h:
https://review.coreboot.org/c/coreboot/+/59738/comment/49b8f14a_b837522c PS1, Line 129: ARCH_X86
I only have the environment for cherry board, and have no idea how to build for x86 platform, could […]
So, there are still errors for PS4 (see Jenkins build console):
In file included from src/soc/intel/common/block/fast_spi/fast_spi.c:15: src/include/lib.h:57:19: error: conflicting types for 'fls'; have 'int(u32)' {aka 'int(unsigned int)'} 57 | static inline int fls(u32 x) { return 32 - clz(x); } | ^~~ In file included from src/arch/x86/include/arch/romstage.h:8, from src/soc/intel/common/block/fast_spi/fast_spi.c:5: src/include/cpu/x86/mtrr.h:167:28: note: previous definition of 'fls' with type 'unsigned int(unsigned int)' 167 | static inline unsigned int fls(unsigned int x) | ^~~
Following Julius' suggestion to rename to __fls() would probably solve the problem.
https://review.coreboot.org/c/coreboot/+/59738/comment/f7bf5449_a674da4f PS1, Line 137: fls
Sure, is there any document can tell how to do the unit tests?
See CB:56543 as an example. Tests can be run by
make unit-tests