diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-19 08:16:58 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-19 08:16:58 +0000 |
commit | a88532bc6061ccc74ca08de161ec6fecf88a85b0 (patch) | |
tree | 7a1b0d1cf802cb5ed794340519d7103ec6270cd7 /src/flash/lpc3180_nand_controller.c | |
parent | 7d6b4b42f61debb058013c4179f29f7fa09d8548 (diff) | |
download | riscv-openocd-a88532bc6061ccc74ca08de161ec6fecf88a85b0.zip riscv-openocd-a88532bc6061ccc74ca08de161ec6fecf88a85b0.tar.gz riscv-openocd-a88532bc6061ccc74ca08de161ec6fecf88a85b0.tar.bz2 |
Zach Welch <zw@superlucidity.net> fix signed/unsigned comparisons
git-svn-id: svn://svn.berlios.de/openocd/trunk@1466 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/lpc3180_nand_controller.c')
-rw-r--r-- | src/flash/lpc3180_nand_controller.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/flash/lpc3180_nand_controller.c b/src/flash/lpc3180_nand_controller.c index 76134e9..c24e30a 100644 --- a/src/flash/lpc3180_nand_controller.c +++ b/src/flash/lpc3180_nand_controller.c @@ -546,7 +546,7 @@ static int lpc3180_write_page(struct nand_device_s *device, u32 page, u8 *data, return ERROR_NAND_OPERATION_NOT_SUPPORTED; } - if (data_size > device->page_size) + if (data_size > (u32)device->page_size) { LOG_ERROR("data size exceeds page size"); return ERROR_NAND_OPERATION_NOT_SUPPORTED; @@ -681,7 +681,7 @@ static int lpc3180_read_page(struct nand_device_s *device, u32 page, u8 *data, u } #endif - if (data_size > device->page_size) + if (data_size > (u32)device->page_size) { LOG_ERROR("data size exceeds page size"); return ERROR_NAND_OPERATION_NOT_SUPPORTED; @@ -741,7 +741,7 @@ static int lpc3180_read_page(struct nand_device_s *device, u32 page, u8 *data, u target_write_u32(target, 0x200b8000, NAND_CMD_READSTART); } - while (page_bytes_done < device->page_size) + while (page_bytes_done < (u32)device->page_size) { /* MLC_ECC_AUTO_DEC_REG = dummy */ target_write_u32(target, 0x200b8014, 0xaa55aa55); |