Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/48196 )
Change subject: Simplifying the initialisation flow for it85spi ......................................................................
Patch Set 4: Code-Review+2
(4 comments)
https://review.coreboot.org/c/flashrom/+/48196/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/48196/4//COMMIT_MSG@7 PS4, Line 7: Simplifying the initialisation flow for it85spi `it85spi.c: Inline it85xx_spi_common_init()`
https://review.coreboot.org/c/flashrom/+/48196/4//COMMIT_MSG@9 PS4, Line 9: 1) Inlining it85xx_spi_common_init since it's only used once in : it85xx_spi_init, after inlining ret value is not needed. no need for the points.
``` Inline it85xx_spi_common_init() to single call site of `it85xx_spi_init() as the construction is a single phase one. This allows for less cyclomatic complexity by validating early and initialisation at the eulogy of the one entry-point to the driver. ```
https://review.coreboot.org/c/flashrom/+/48196/1/it85spi.c File it85spi.c:
https://review.coreboot.org/c/flashrom/+/48196/1/it85spi.c@362 PS1, Line 362: */
Not sure what do you mean here: do you mean this FIXME comment should be below /* Set this as SPI co […]
Ack
https://review.coreboot.org/c/flashrom/+/48196/2/it85spi.c File it85spi.c:
https://review.coreboot.org/c/flashrom/+/48196/2/it85spi.c@360 PS2, Line 360: free(data);
It maybe a bit more clear now for you that this just papers over the issue that register_shutdown() […]
Ack