Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk. Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58479 )
Change subject: [RFC] writeprotect: add functions to read and write wp_chip_state ......................................................................
Patch Set 7:
(3 comments)
File writeprotect.c:
https://review.coreboot.org/c/flashrom/+/58479/comment/11276b83_372f1b8d PS6, Line 26: print_wp_chip_state
You can move print_wp_chip_state here on the top, and avoid forward declaration.
I think it's a bit nicer to keep it with the other printing functions that get added at the bottom of the file.
Alternatively I can change it to a function that writes to a string and declare it in the header since that would be somewhat useful for wp users.
https://review.coreboot.org/c/flashrom/+/58479/comment/32435360_69c2f8c5 PS6, Line 28: static int read_reg_bit( : const struct flashctx *flash, : const struct reg_bit_info bit, : uint8_t *value, : bool *present)
Just to check: does this not fit into 112 chars? It really helps to grep when all parameters are on […]
Done
https://review.coreboot.org/c/flashrom/+/58479/comment/7a1d6e9f_42837122 PS6, Line 73: void *suppress_unused_warning_for_read_wp_chip_state = read_wp_chip_state;
This merely avoids a warning about the `read_wp_chip_state()` function being unused. […]
I can move the read/write functions into another commit if it really would be easier to review them that way, but they are helper functions that get used in several places so they don't really belong with any other change.
They are also quite complicated but do a well defined task so I thought it would be easier to them review them on their own.