Miklós Márton has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/56637 )
Change subject: ni845x_spi: Fix signed - unsigned comparisons ......................................................................
ni845x_spi: Fix signed - unsigned comparisons
Change-Id: I48ef927aa28433fb0e3b3a1f3fb2e797095e53bd Signed-off-by: Miklós Márton martonmiklosqdev@gmail.com --- M ni845x_spi.c 1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/37/56637/1
diff --git a/ni845x_spi.c b/ni845x_spi.c index 2153510..b19ddd4 100644 --- a/ni845x_spi.c +++ b/ni845x_spi.c @@ -185,7 +185,7 @@
device_pid = pid;
- if (!serial || strtol(serial, NULL, 16) == serial_as_number) + if (!serial || (unsigned long int)strtol(serial, NULL, 16) == serial_as_number) break;
if (found_devices_count > 1) { @@ -222,7 +222,7 @@ uint16_t *set_io_voltage_mV, enum voltage_coerce_mode coerce_mode) { - int i = 0; + unsigned int i = 0; uint8_t selected_voltage_100mV = 0; uint8_t requested_io_voltage_100mV = 0;
@@ -480,7 +480,7 @@ return 0; }
-static int ni845x_spi_transmit(struct flashctx *flash, +static int ni845x_spi_transmit(const struct flashctx *flash, unsigned int write_cnt, unsigned int read_cnt, const unsigned char *write_arr, @@ -555,7 +555,7 @@ if (CS_str) { CS_number = CS_str[0] - '0'; free(CS_str); - if (strlen(CS_str) > 1 || CS_number < 0 || 7 < CS_number) { + if (strlen(CS_str) > 1 || 7 < CS_number) { msg_perr("Only CS 0-7 supported\n"); return 1; }