Attention is currently required from: Edward O'Callaghan, Stefan Reinauer.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/75646?usp=email )
Change subject: Replace all flashchips accesses with get functions ......................................................................
Patch Set 5:
(7 comments)
Patchset:
PS5: This is awesome! Thank you so much for the patch!
File flashchips.c:
https://review.coreboot.org/c/flashrom/+/75646/comment/33f9b98c_b5f85d79 : PS5, Line 28: * Temporarily, this file is sorted alphabetically by vendor and name to : * assist with merging the Chromium fork of flashrom. Can we remove this comment by now? (maybe in a separate patch). the most confusing part is "temporarily".
https://review.coreboot.org/c/flashrom/+/75646/comment/91d643ef_a179c1d5 : PS5, Line 34: internal_
i understand there is no technical need, but i did it to make it more obvious that it is not coming […]
I agree that "internal" almost always means internal programmer. It is flashromspeak :) It is certainly not coming from the outside because it is static.
I am not sure a prefix needed, if you think it is really needed then maybe "supported_flashchips", but this doesn't add much readability. Maybe let's try without prefix?
https://review.coreboot.org/c/flashrom/+/75646/comment/c86ac272_1775a663 : PS5, Line 20844: get_flashchips(void)
sure, but that would be more complex.
Where would the caller get the pointer to flashchip db? and why the caller needs to have the pointer? I want to understand the idea.
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/75646/comment/c2c93978_dd607a9f : PS5, Line 1099: return -1; Maybe you can add `msg_gerr` before returning. It seems like a big issue if the entire database of chips is absent.
File tests/selfcheck.c:
https://review.coreboot.org/c/flashrom/+/75646/comment/bf8cd711_d836c264 : PS5, Line 80: /* unused */ But it is used two lines below?
https://review.coreboot.org/c/flashrom/+/75646/comment/ae27dd19_c5f3a407 : PS5, Line 83: flashchips = get_flashchips(); : flashchips_size = get_flashchips_size(); Can this be immediately initialised? (and the same above). This is what non-test code is doing.