stm32l4x: cosmetic simplification of get_stm32l4_info
[fw/openocd] / src / flash / nor / esirisc_flash.c
index 3bed06581e20d53c0513800666021fa189bdff82..88f00bccaa6a0a676a5adcfb2d5232a75ee4bfe3 100644 (file)
@@ -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);
@@ -493,7 +494,7 @@ static int esirisc_flash_info(struct flash_bank *bank, char *buf, int buf_size)
        struct esirisc_flash_bank *esirisc_info = bank->driver_priv;
 
        snprintf(buf, buf_size,
-                       "%4s cfg at 0x%" PRIx32 ", clock %" PRId32 ", wait_states %" PRId32,
+                       "%4s cfg at 0x%" PRIx32 ", clock %" PRIu32 ", wait_states %" PRIu32,
                        "",     /* align with first line */
                        esirisc_info->cfg,
                        esirisc_info->clock,