Commit c69c9c84 authored by Stefan Tauner's avatar Stefan Tauner
Browse files

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: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
parent 8ca4255d
......@@ -21,7 +21,7 @@
#include "flash.h"
static int printlock_w39_fwh_block(struct flashchip *flash, int offset)
static int printlock_w39_fwh_block(struct flashchip *flash, unsigned int offset)
{
chipaddr wrprotect = flash->virtual_registers + offset + 2;
uint8_t locking;
......@@ -59,7 +59,7 @@ static int printlock_w39_fwh_block(struct flashchip *flash, int offset)
return (locking & ((1 << 2) | (1 << 0))) ? -1 : 0;
}
static int unlock_w39_fwh_block(struct flashchip *flash, int offset)
static int unlock_w39_fwh_block(struct flashchip *flash, unsigned int offset)
{
chipaddr wrprotect = flash->virtual_registers + offset + 2;
uint8_t locking;
......@@ -80,7 +80,7 @@ static int unlock_w39_fwh_block(struct flashchip *flash, int offset)
return 0;
}
static uint8_t w39_idmode_readb(struct flashchip *flash, int offset)
static uint8_t w39_idmode_readb(struct flashchip *flash, unsigned int offset)
{
chipaddr bios = flash->virtual_memory;
uint8_t val;
......@@ -127,7 +127,7 @@ static int printlock_w39_bootblock_64k16k(uint8_t lock)
return 0;
}
static int printlock_w39_common(struct flashchip *flash, int offset)
static int printlock_w39_common(struct flashchip *flash, unsigned int offset)
{
uint8_t lock;
......@@ -138,7 +138,7 @@ static int printlock_w39_common(struct flashchip *flash, int offset)
static int printlock_w39_fwh(struct flashchip *flash)
{
int i, total_size = flash->total_size * 1024;
unsigned int i, total_size = flash->total_size * 1024;
int ret = 0;
/* Print lock status of the complete chip */
......@@ -150,7 +150,7 @@ static int printlock_w39_fwh(struct flashchip *flash)
static int unlock_w39_fwh(struct flashchip *flash)
{
int i, total_size = flash->total_size * 1024;
unsigned int i, total_size = flash->total_size * 1024;
/* Unlock the complete chip */
for (i = 0; i < total_size; i += flash->page_size)
......
......@@ -62,7 +62,7 @@ done:
static int wbsio_spi_send_command(unsigned int writecnt, unsigned int readcnt,
const unsigned char *writearr, unsigned char *readarr);
static int wbsio_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len);
static int wbsio_spi_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len);
static const struct spi_programmer spi_programmer_wbsio = {
.type = SPI_CONTROLLER_WBSIO,
......@@ -194,7 +194,7 @@ static int wbsio_spi_send_command(unsigned int writecnt, unsigned int readcnt,
return 0;
}
static int wbsio_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len)
static int wbsio_spi_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len)
{
return read_memmapped(flash, buf, start, len);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment