Attention is currently required from: Alexander Goncharov, Brian Norris, Edward O'Callaghan.
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/75991?usp=email )
Change subject: flashrom: only perform WP unlock for write/erase operations ......................................................................
Patch Set 4:
(3 comments)
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/75991/comment/906b1c82_b854acfd : PS3, Line 2056: const bool read_it
not used, drop it
Done
https://review.coreboot.org/c/flashrom/+/75991/comment/a91dc70f_6baa17b1 : PS3, Line 2057: const bool verify_it
not used, drop it
Done
https://review.coreboot.org/c/flashrom/+/75991/comment/b6d2f976_9961555a : PS3, Line 2060: int ret = 0;
if ret were initialized as `-1` there would be no need for `ret = -1` in if branches.
Setting the return code in each error branch is more idiomatic for C code IMO.
Ideally each error block would just be `return <error code>;` but since we do a `goto ...` instead, keeping the assignment to ret at least indicates that we want to return a particular value at that point.