Hello Huayang Duan, build bot (Jenkins), Julius Werner,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/40404
to look at the new patch set (#4).
Change subject: mmio: Use unsigned types for bit operations ......................................................................
mmio: Use unsigned types for bit operations
When declaring bit fields with 31 bits (e.g: DEFINE_BITFIELD(MYREG, 30, 0) ) the calculation of mask value will go overflow ( "error: integer overflow in expression '-2147483648 - 1' of type 'int' Results in '2147483647'").
And for bit fields with 32 bits (e.g: DEFINE_BITFIELD(MYREG, 31, 0) ) the error will be: "error: left shift count >= width of type [-Werror=shift-count-overflow]"
To fix these issues, we want to bit field macros to always use unsigned integers, and use 64bit integer when creating mask value.
Change-Id: Ie3cddf9df60b83de4e21243bfde6b79729fb06ef Signed-off-by: Hung-Te Lin hungte@chromium.org --- M src/include/device/mmio.h 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/04/40404/4