Shawn C has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49076 )
Change subject: arch/x86/pci_io_cfg.h: Fix undefined behaviour in left-shift ......................................................................
Patch Set 2: Code-Review+1
Patch Set 1: Code-Review+1
(1 comment)
Hmmm, I remember some resistance towards these correct-by-definition but unnecessary-given-we-know-the-compiler changes. I guess we should have a broader discussion about it at some point.
Personally, I'm ok with it. Would prefer `1u`, though (lower case to be more distinct from the number part, and the `L` doesn't seem needed).
Thanks for reviewing. I updated the short description. I'll keep the code since both upper/lower-cases of "unsigned" symbols exists in the current coreboot code base. We can change it if we have an unify coding style.
Indeed we might need to discuss how are we process the errors produced by sanitizers( coreboot have two types: undefined behavior and address-specific. There are still a few compliants( not sure if its real bug now) from UBsan. I'll file the bug then.