From c69c9c84e0341b701d9966fea8ce54d4e017bbb7 Mon Sep 17 00:00:00 2001 From: Stefan Tauner Date: Wed, 23 Nov 2011 09:13:48 +0000 Subject: Unsignify lengths and addresses in chip functions and structs Push those changes forward where needed to prevent new sign conversion warnings where possible. Corresponding to flashrom svn r1470. Signed-off-by: Stefan Tauner Acked-by: Carl-Daniel Hailfinger --- spi.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'spi.c') diff --git a/spi.c b/spi.c index f02f091..60f77b0 100644 --- a/spi.c +++ b/spi.c @@ -97,9 +97,9 @@ int default_spi_send_multicommand(struct spi_command *cmds) return result; } -int default_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len) +int default_spi_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) { - int max_data = spi_programmer->max_data_read; + unsigned int max_data = spi_programmer->max_data_read; if (max_data == MAX_DATA_UNSPECIFIED) { msg_perr("%s called, but SPI read chunk size not defined " "on this hardware. Please report a bug at " @@ -109,9 +109,9 @@ int default_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len) return spi_read_chunked(flash, buf, start, len, max_data); } -int default_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int len) +int default_spi_write_256(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) { - int max_data = spi_programmer->max_data_write; + unsigned int max_data = spi_programmer->max_data_write; if (max_data == MAX_DATA_UNSPECIFIED) { msg_perr("%s called, but SPI write chunk size not defined " "on this hardware. Please report a bug at " @@ -121,9 +121,9 @@ int default_spi_write_256(struct flashchip *flash, uint8_t *buf, int start, int return spi_write_chunked(flash, buf, start, len, max_data); } -int spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len) +int spi_chip_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) { - int addrbase = 0; + unsigned int addrbase = 0; if (!spi_programmer->read) { msg_perr("%s called, but SPI read is unsupported on this " "hardware. Please report a bug at " @@ -160,7 +160,7 @@ int spi_chip_read(struct flashchip *flash, uint8_t *buf, int start, int len) * .write_256 = spi_chip_write_1 */ /* real chunksize is up to 256, logical chunksize is 256 */ -int spi_chip_write_256(struct flashchip *flash, uint8_t *buf, int start, int len) +int spi_chip_write_256(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) { if (!spi_programmer->write_256) { msg_perr("%s called, but SPI page write is unsupported on this " -- cgit v1.1