summaryrefslogtreecommitdiffstats
path: root/dediprog.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 /dediprog.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 'dediprog.c')
-rw-r--r--dediprog.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/dediprog.c b/dediprog.c
index 58eeb44..ca2d3e0 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -206,13 +206,13 @@ static int dediprog_set_spi_speed(uint16_t speed)
* @return 0 on success, 1 on failure
*/
static int dediprog_spi_bulk_read(struct flashchip *flash, uint8_t *buf,
- int start, int len)
+ unsigned int start, unsigned int len)
{
int ret;
- int i;
+ unsigned int i;
/* chunksize must be 512, other sizes will NOT work at all. */
- const int chunksize = 0x200;
- const int count = len / chunksize;
+ const unsigned int chunksize = 0x200;
+ const unsigned int count = len / chunksize;
const char count_and_chunk[] = {count & 0xff,
(count >> 8) & 0xff,
chunksize & 0xff,
@@ -253,14 +253,14 @@ static int dediprog_spi_bulk_read(struct flashchip *flash, uint8_t *buf,
return 0;
}
-static int dediprog_spi_read(struct flashchip *flash, uint8_t *buf, int start,
- int len)
+static int dediprog_spi_read(struct flashchip *flash, uint8_t *buf,
+ unsigned int start, unsigned int len)
{
int ret;
/* chunksize must be 512, other sizes will NOT work at all. */
- const int chunksize = 0x200;
- int residue = start % chunksize ? chunksize - start % chunksize : 0;
- int bulklen;
+ const unsigned int chunksize = 0x200;
+ unsigned int residue = start % chunksize ? chunksize - start % chunksize : 0;
+ unsigned int bulklen;
dediprog_set_leds(PASS_OFF|BUSY_ON|ERROR_OFF);
@@ -300,7 +300,7 @@ static int dediprog_spi_read(struct flashchip *flash, uint8_t *buf, int start,
}
static int dediprog_spi_write_256(struct flashchip *flash, uint8_t *buf,
- int start, int len)
+ unsigned int start, unsigned int len)
{
int ret;
OpenPOWER on IntegriCloud