Attention is currently required from: Aarya, Anastasia Klimchuk, Bill XIE.
Peter Marheine has posted comments on this change by Bill XIE. ( https://review.coreboot.org/c/flashrom/+/84721?usp=email )
Change subject: erasure_layout: Add an option to sacrifice unchanged blocks for speed ......................................................................
Patch Set 8:
(3 comments)
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/84721/comment/59675f49_9e423cad?usp... : PS8, Line 124: " --sacrifice-ratio <ratio> Maximum %% memory that is allowed for redundant\n" This is understandable, but reads somewhat awkwardly to me. Perhaps:
Fraction (as a percentage, 0-50) of an erase block that may be erased even if unmodified. Larger values may complete programming faster, but may also hurt chip longevity by erasing cells unnecessarily. Default 0.
File erasure_layout.c:
https://review.coreboot.org/c/flashrom/+/84721/comment/c2b42544_bc111060?usp... : PS8, Line 253: needless needing?
File tests/erase_func_algo.c:
https://review.coreboot.org/c/flashrom/+/84721/comment/73021652_bf21c555?usp... : PS8, Line 1235: } : }, : sizeof(*all_cases) : ); : memcpy( : &all_cases[num_parameterized * 2 + 1], : (const struct CMUnitTest[]){ : (const struct CMUnitTest) { : .name = "write with sacrifice ratio 50", : .test_func = test_write_with_sacrifice_ratio50, : } : }, : sizeof(*all_cases) : ); The previous `memcpy` is already set up to copy an array of structs, so you can inline the new struct there.
```suggestion }, (const struct CMUnitTest) { .name = "write with sacrifice ratio 50", .test_func = test_write_with_sacrifice_ratio50, }, }, sizeof(*all_cases) * num_unparameterized ); ```