1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

digilent_spi.c: Rename variable p to param_str

That's not a very meaningful name and it makes searching within the code
hard. Thus, rename the variable to `param_str`.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I88a78b612d4d2373943f8daa1b6b6d89329405c2
Reviewed-on: https://review.coreboot.org/c/flashrom/+/65928
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
This commit is contained in:
Felix Singer 2022-07-17 00:51:08 +02:00 committed by Anastasia Klimchuk
parent a93c2e7d1e
commit a063073dc5

View File

@ -376,7 +376,7 @@ static const struct digilent_spispeeds spispeeds[] = {
static int digilent_spi_init(void) static int digilent_spi_init(void)
{ {
char *p; char *param_str;
uint32_t speed_hz = spispeeds[0].speed; uint32_t speed_hz = spispeeds[0].speed;
int i; int i;
struct libusb_device_handle *handle = NULL; struct libusb_device_handle *handle = NULL;
@ -408,28 +408,28 @@ static int digilent_spi_init(void)
goto close_handle; goto close_handle;
} }
p = extract_programmer_param_str("spispeed"); param_str = extract_programmer_param_str("spispeed");
if (p) { if (param_str) {
for (i = 0; spispeeds[i].name; ++i) { for (i = 0; spispeeds[i].name; ++i) {
if (!strcasecmp(spispeeds[i].name, p)) { if (!strcasecmp(spispeeds[i].name, param_str)) {
speed_hz = spispeeds[i].speed; speed_hz = spispeeds[i].speed;
break; break;
} }
} }
if (!spispeeds[i].name) { if (!spispeeds[i].name) {
msg_perr("Error: Invalid spispeed value: '%s'.\n", p); msg_perr("Error: Invalid spispeed value: '%s'.\n", param_str);
free(p); free(param_str);
goto close_handle; goto close_handle;
} }
free(p); free(param_str);
} }
p = extract_programmer_param_str("reset"); param_str = extract_programmer_param_str("reset");
if (p && strlen(p)) if (param_str && strlen(param_str))
reset_board = (p[0] == '1'); reset_board = (param_str[0] == '1');
else else
reset_board = default_reset(handle); reset_board = default_reset(handle);
free(p); free(param_str);
if (reset_board) { if (reset_board) {