diff options
author | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2011-11-23 09:13:48 +0000 |
---|---|---|
committer | Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> | 2011-11-23 09:13:48 +0000 |
commit | c69c9c84e0341b701d9966fea8ce54d4e017bbb7 (patch) | |
tree | 2ea0b12abf9dd3483246423752239b88c6d7942e /linux_spi.c | |
parent | 8ca4255d7968dbf6301367074cc7267d22a25658 (diff) | |
download | flashrom-c69c9c84e0341b701d9966fea8ce54d4e017bbb7.tar.gz flashrom-c69c9c84e0341b701d9966fea8ce54d4e017bbb7.tar.bz2 flashrom-c69c9c84e0341b701d9966fea8ce54d4e017bbb7.zip |
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 <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'linux_spi.c')
-rw-r--r-- | linux_spi.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/linux_spi.c b/linux_spi.c index de82def3f..44a2fcd6d 100644 --- a/linux_spi.c +++ b/linux_spi.c @@ -36,10 +36,10 @@ static int fd = -1; static int linux_spi_shutdown(void *data); static int linux_spi_send_command(unsigned int writecnt, unsigned int readcnt, const unsigned char *txbuf, unsigned char *rxbuf); -static int linux_spi_read(struct flashchip *flash, uint8_t *buf, int start, - int len); +static int linux_spi_read(struct flashchip *flash, uint8_t *buf, + unsigned int start, unsigned int len); static int linux_spi_write_256(struct flashchip *flash, uint8_t *buf, - int start, int len); + unsigned int start, unsigned int len); static const struct spi_programmer spi_programmer_linux = { .type = SPI_CONTROLLER_LINUX, @@ -131,14 +131,14 @@ static int linux_spi_send_command(unsigned int writecnt, unsigned int readcnt, return 0; } -static int linux_spi_read(struct flashchip *flash, uint8_t *buf, int start, - int len) +static int linux_spi_read(struct flashchip *flash, uint8_t *buf, + unsigned int start, unsigned int len) { - return spi_read_chunked(flash, buf, start, len, getpagesize()); + return spi_read_chunked(flash, buf, start, len, (unsigned)getpagesize()); } static int linux_spi_write_256(struct flashchip *flash, uint8_t *buf, - int start, int len) + unsigned int start, unsigned int len) { - return spi_write_chunked(flash, buf, start, len, getpagesize() - 4); + return spi_write_chunked(flash, buf, start, len, ((unsigned)getpagesize()) - 4); } |