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/+/58475 )
Change subject: spi25_statusreg: make register read/write functions generic ......................................................................
Patch Set 11:
(3 comments)
File spi25_statusreg.c:
https://review.coreboot.org/c/flashrom/+/58475/comment/2601bdea_b2de0314 PS9, Line 120: msg_cerr("Cannot read register: not supported by chip\n");
Maybe I am missing something, but how nested ifs prevent using an else statement? You wrap condition […]
There are multiple ways of writing SR2, so there's a nested if/else chain inside the `if (reg == STATUS2)` block.
But someone may try to try to write SR2 on a chip that doesn't support it, in which case we should generate an error, even though the `if (reg == STATUS2)` block will run.
File spi25_statusreg.c:
https://review.coreboot.org/c/flashrom/+/58475/comment/1c5b4d1d_cccacf79 PS10, Line 119: } : else { :
I am sorry I should have noticed this earlier, but `else` (and `else if`) needs to be on the same li […]
Done
https://review.coreboot.org/c/flashrom/+/58475/comment/f1688d70_3528f68a PS10, Line 130: flash, sizeof(read_cmd), sizeof(readarr), : &read_cmd, readarr);
This can fit into 112 chars right? It helps to git grep when all function arguments are on one line. […]
Done