summaryrefslogtreecommitdiffstats
path: root/dummyflasher.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-11-23 09:13:48 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-11-23 09:13:48 +0000
commitc69c9c84e0341b701d9966fea8ce54d4e017bbb7 (patch)
tree2ea0b12abf9dd3483246423752239b88c6d7942e /dummyflasher.c
parent8ca4255d7968dbf6301367074cc7267d22a25658 (diff)
downloadast2050-flashrom-c69c9c84e0341b701d9966fea8ce54d4e017bbb7.zip
ast2050-flashrom-c69c9c84e0341b701d9966fea8ce54d4e017bbb7.tar.gz
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 'dummyflasher.c')
-rw-r--r--dummyflasher.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/dummyflasher.c b/dummyflasher.c
index 822bc73..8437c58 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -46,24 +46,24 @@ enum emu_chip {
};
static enum emu_chip emu_chip = EMULATE_NONE;
static char *emu_persistent_image = NULL;
-static int emu_chip_size = 0;
+static unsigned int emu_chip_size = 0;
#if EMULATE_SPI_CHIP
-static int emu_max_byteprogram_size = 0;
-static int emu_max_aai_size = 0;
-static int emu_jedec_se_size = 0;
-static int emu_jedec_be_52_size = 0;
-static int emu_jedec_be_d8_size = 0;
-static int emu_jedec_ce_60_size = 0;
-static int emu_jedec_ce_c7_size = 0;
+static unsigned int emu_max_byteprogram_size = 0;
+static unsigned int emu_max_aai_size = 0;
+static unsigned int emu_jedec_se_size = 0;
+static unsigned int emu_jedec_be_52_size = 0;
+static unsigned int emu_jedec_be_d8_size = 0;
+static unsigned int emu_jedec_ce_60_size = 0;
+static unsigned int emu_jedec_ce_c7_size = 0;
#endif
#endif
-static int spi_write_256_chunksize = 256;
+static unsigned int spi_write_256_chunksize = 256;
static int dummy_spi_send_command(unsigned int writecnt, unsigned int readcnt,
const unsigned char *writearr, unsigned char *readarr);
static int dummy_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_dummyflasher = {
.type = SPI_CONTROLLER_DUMMY,
@@ -320,8 +320,8 @@ void dummy_chip_readn(uint8_t *buf, const chipaddr addr, size_t len)
static int emulate_spi_chip_response(unsigned int writecnt, unsigned int readcnt,
const unsigned char *writearr, unsigned char *readarr)
{
- int offs;
- static int aai_offs;
+ unsigned int offs;
+ static int unsigned aai_offs;
static int aai_active = 0;
if (writecnt == 0) {
@@ -549,7 +549,7 @@ static int dummy_spi_send_command(unsigned int writecnt, unsigned int readcnt,
}
static int dummy_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,
spi_write_256_chunksize);
OpenPOWER on IntegriCloud