flash/nor: Use proper data types in driver API
Use 'unsigned int' and 'bool' instead of 'int' where appropriate. While at it, fix some coding style issues. No new Clang analyzer warnings. Change-Id: I700802c9ee81c3c7ae73108f0f8f06b15a4345f8 Signed-off-by: Marc Schink <dev@zapb.de> Reviewed-on: http://openocd.zylin.com/4929 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
@@ -252,7 +252,8 @@ static int esirisc_flash_recall(struct flash_bank *bank)
|
||||
return esirisc_flash_control(bank, CONTROL_R);
|
||||
}
|
||||
|
||||
static int esirisc_flash_erase(struct flash_bank *bank, int first, int last)
|
||||
static int esirisc_flash_erase(struct flash_bank *bank, unsigned int first,
|
||||
unsigned int last)
|
||||
{
|
||||
struct esirisc_flash_bank *esirisc_info = bank->driver_priv;
|
||||
struct target *target = bank->target;
|
||||
@@ -263,7 +264,7 @@ static int esirisc_flash_erase(struct flash_bank *bank, int first, int last)
|
||||
|
||||
(void)esirisc_flash_disable_protect(bank);
|
||||
|
||||
for (int page = first; page < last; ++page) {
|
||||
for (unsigned int page = first; page < last; ++page) {
|
||||
uint32_t address = page * FLASH_PAGE_SIZE;
|
||||
|
||||
target_write_u32(target, esirisc_info->cfg + ADDRESS, address);
|
||||
|
||||
Reference in New Issue
Block a user