Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45623 )
Change subject: ec/kontron: Fix control flow DEADCODE issue ......................................................................
Patch Set 4:
(1 comment)
Please never remove checks because of tools.
https://review.coreboot.org/c/coreboot/+/45623/4/src/ec/kontron/kempld/kempl... File src/ec/kontron/kempld/kempld_i2c.c:
https://review.coreboot.org/c/coreboot/+/45623/4/src/ec/kontron/kempld/kempl... PS4, Line 253: if (prescale < 0)
This is a safeguard in case prescale ends up being negative. I'd replace it with an assertion.
I guess I kept it in case the constants would change (it is probably runtime configurable in the Linux driver). A _Static_assertion() would make most sense here I guess.