Attention is currently required from: Felix Singer, Nico Huber, Edward O'Callaghan, Anastasia Klimchuk, Nikolai Artemiev. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/58736 )
Change subject: ichspi: Extract handling programmer param into a function ......................................................................
Patch Set 2: Code-Review+1
(1 comment)
File ichspi.c:
https://review.coreboot.org/c/flashrom/+/58736/comment/e8bccf37_7801da56 PS2, Line 1764: arg idea: explicitly handle the case of `!arg` (i.e. user did not specify `ich_spi_mode`) first?
static int get_ich_spi_mode_param(enum ich_spi_mode *ich_spi_mode) { char *const arg = extract_programmer_param("ich_spi_mode"); if (!arg) { return 0; } else if (!strcmp(arg, "hwseq")) { *ich_spi_mode = ich_hwseq; msg_pspew("user selected hwseq\n"); } else if (!strcmp(arg, "swseq")) { *ich_spi_mode = ich_swseq; msg_pspew("user selected swseq\n"); } else if (!strcmp(arg, "auto")) { msg_pspew("user selected auto\n"); *ich_spi_mode = ich_auto; } else if (!strlen(arg)) { msg_perr("Missing argument for ich_spi_mode.\n"); free(arg); return ERROR_FATAL; } else { msg_perr("Unknown argument for ich_spi_mode: %s\n", arg); free(arg); return ERROR_FATAL; } free(arg);
return 0; }