Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Anastasia Klimchuk, Sergii Dmytruk. Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58480 )
Change subject: flashchips,writeprotect_ranges: add range decoding function ......................................................................
Patch Set 11:
(5 comments)
File flash.h:
https://review.coreboot.org/c/flashrom/+/58480/comment/1b9e84d9_04a2c0ed PS10, Line 202: range_decode_fn_t
In this typedef wp_ prefix would be informative. […]
Done
https://review.coreboot.org/c/flashrom/+/58480/comment/0b646f42_c909d9db PS10, Line 319: decode_range
If typedef gets wp_ prefix, this name can be decode_wp_range.
I like that name better, but it won't fit within 2 tabs like other flashchip fields so the flashchip definitions will look odd. Maybe get_wp_range? But I think decode is more accurate.
File libflashrom.h:
https://review.coreboot.org/c/flashrom/+/58480/comment/0a522d5b_e9a47ffa PS10, Line 132: uint32_t chip_len;
Why is this field here? Looks like it should have been an additional parameter to `decode_range` fun […]
Like the `chip` field in `struct flashrom_wp_chip_state`, it was mostly there for convenience, e.g. it is also used by the function that converts it to a string.
I've fixed it now.
File writeprotect_ranges.c:
https://review.coreboot.org/c/flashrom/+/58480/comment/fc8e4551_2adda57b PS10, Line 19: ithat
typo
Done
https://review.coreboot.org/c/flashrom/+/58480/comment/d91f00de_ee45f540 PS10, Line 40: range->chip_len;
Same as Sergii said, chip_len doesn't seem to belong to range. […]
Done