Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons, Nikolai Artemiev. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58474 )
Change subject: [RFC] writeprotect, cli_classic: create writeprotect foundation ......................................................................
Patch Set 5:
(3 comments)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/58474/comment/82ed827e_1087e431 PS5, Line 778: set_wp_disable should be done before setting the range Is there way to check this pre-requisite in set_wp_range?
https://review.coreboot.org/c/flashrom/+/58474/comment/996e6962_854566fd PS5, Line 783: set_wp_range must happen before set_wp_enable Same question as previous, can set_wp_enable check that set_wp_range has been called?
(the comment is useful anyway)
File writeprotect.c:
PS3:
That seems reasonable, I can just comment out the calls in cli_classic.c. […]
Yes I agree. I would remove ~everything and then add one function at a time with implementation, and with usage in cli_classic (or two at a time, if it is get-set).
The question is how to make work-in-progress look nice in cli_classic. What if we leave struct wp for the work-in-progress time? You are removing it in this first patch, but replacement is not ready yet. Maybe do not remove?
What I am thinking is to leave struct wp, so that cli_classic compiles as before. Then add 1-2 new functions at a time, with implementation and upgrading the usage in cli_classic. At the end when all functions implemented, there will be no usages of struct wp, so you can remove it?