Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/47655 )
Change subject: it85spi.c: Factor out global state ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/flashrom/+/47655/1/it85spi.c File it85spi.c:
https://review.coreboot.org/c/flashrom/+/47655/1/it85spi.c@238 PS1, Line 238: _rom(drv_data);
after this line you should free data
After looking at this a bit more, I think you may as well create a patch that removes some of these largely useless indirection.
Part 1/2) remove this function and replace the call site with a direct call to `it85xx_exit_scratch_rom()`.
https://review.coreboot.org/c/flashrom/+/47655/1/it85spi.c@309 PS1, Line 309: msg_pdbg("FWH: %s():%d ret=%d\n", __func__, __LINE__, ret); : if (!ret) {
as a patch before this one perhaps remove this debug line and invert the if logic to take the rest o […]
Part 2/2) Inline it85xx_spi_common_init() implementation here.