Attention is currently required from: Felix Singer, Edward O'Callaghan.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/68238 )
Change subject: rayer_spi.c: Roll up programmer type search logic into func ......................................................................
Patch Set 2: Code-Review+1
(3 comments)
File rayer_spi.c:
https://review.coreboot.org/c/flashrom/+/68238/comment/59faec05_6c4f00ac PS2, Line 264: *prog_type = strdup(arg); As mentioned in CB:68230, calling `get_progtype()` here and having this function "return" the prog type instead avoids the need to `strdup()` the string. You'd need a "pointer to (pointer to (struct rayer_programmer))".
https://review.coreboot.org/c/flashrom/+/68238/comment/ee73b1ee_2ccd991f PS2, Line 274: NULL No, this changes behavior. If no programmer type is specified, the original code defaults to the first entry. You'd have to move this after the array and return a pointer to `rayer_spi_types[0]` (the initial value of `prog`).
https://review.coreboot.org/c/flashrom/+/68238/comment/2c55c63a_f405019a PS2, Line 276: const struct rayer_programmer rayer_spi_types[] = { Shouldn't this be marked `static`? Not sure if it matters for constants, but if this were to be placed in the stack (it would definitely be if it were not const), things would break.