Jacob Garber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32054 )
Change subject: nb/intel/pineview: Correct unsigned integer check in msbpos ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/32054/2/src/northbridge/intel/pineview/ramin... File src/northbridge/intel/pineview/raminit.c:
https://review.coreboot.org/#/c/32054/2/src/northbridge/intel/pineview/ramin... PS2, Line 329: static u8 lsbpos(u8 val) //Forward : { : u8 i; : for (i = 0; (i < 8) && ((val & (1 << i)) == 0); i++) : ; : return i; : } : : static u8 msbpos(u8 val) //Reverse : { : u8 i; : for (i = 7; (i != 0) && ((val & (1 << i)) == 0); i--) : ; : return i; : }
Your return value is still meaningless when you input 0. […]
Alright. lsbpos(0) also returns 8, so I should probably fix that too. Should that be done in a separate commit?