Attention is currently required from: Edward O'Callaghan, Angel Pons, Light. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62764 )
Change subject: ich_descriptors.c: Ensure unsigned types >=0 on to prevent underflow ......................................................................
Patch Set 16:
(1 comment)
File ich_descriptors.c:
https://review.coreboot.org/c/flashrom/+/62764/comment/3d1e7087_44837bdc PS14, Line 501: for (j = 0; j < (size_t)min(num_regions, 12); j++)
I don't think it's the max number of regions as num_regions can be > 12. […]
I agree this is not the max number of regions (initialised as 10 or 16 above), but let's assume it's SOMETHING_ELSE. I would really prefer to introduce a macro, or a constant, in a separate patch. This patch is small (which is great), and is doing exactly one small thing, which is even better (prevents underflow and fixes one scan-build issue). I would keep it like this.
Would you agree to leave macro/constant for later (for a separate patch)? Especially given that we need to figure out good name for "12".