Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47655 )
Change subject: it85spi.c: Refactor singleton states into reentrant pattern ......................................................................
Patch Set 6:
(2 comments)
Thank you everyone for your comments!
https://review.coreboot.org/c/flashrom/+/47655/5/it85spi.c File it85spi.c:
https://review.coreboot.org/c/flashrom/+/47655/5/it85spi.c@77 PS5, Line 77: unsigned int shm_io_base; : unsigned char *ce_high, *ce_low; : int it85xx_scratch_rom_reenter; :
thanks for picking this up.
Done, I set up editor so that tab is tab and it's 8 chars. I am interested to improve the linter! (but not in this CL).
https://review.coreboot.org/c/flashrom/+/47655/5/it85spi.c@321 PS5, Line 321: spi_master_it85xx.data = data;
Removing "static globals of any kind" is not a goal in and of itself. […]
Yes, there will be more patches [coming soon] to add unit tests, and removing global state is a big thing that unblocks unit testing.