flash: use proper format with uint32_t
Modify the format strings to properly handle uint32_t data types. Change the type of variable retval in 'nor/ambiqmicro.c' to match both the value to carry and the returned type of the function. Fix the prototype mismatch of function lpc2900_address2sector() between the header and the C file. Change-Id: I68ffba9bd83eec8132f83bff3af993861fd09d84 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5816 Tested-by: jenkins
This commit is contained in:
@@ -2052,7 +2052,7 @@ static int cfi_intel_write_words(struct flash_bank *bank, const uint8_t *word,
|
||||
|
||||
/* Check for valid size */
|
||||
if (wordcount > bufferwsize) {
|
||||
LOG_ERROR("Number of data words %" PRId32 " exceeds available buffersize %" PRId32,
|
||||
LOG_ERROR("Number of data words %" PRIu32 " exceeds available buffersize %" PRIu32,
|
||||
wordcount, buffersize);
|
||||
return ERROR_FLASH_OPERATION_FAILED;
|
||||
}
|
||||
@@ -2167,8 +2167,8 @@ static int cfi_spansion_write_words(struct flash_bank *bank, const uint8_t *word
|
||||
|
||||
/* Check for valid size */
|
||||
if (wordcount > bufferwsize) {
|
||||
LOG_ERROR("Number of data words %" PRId32 " exceeds available buffersize %"
|
||||
PRId32, wordcount, buffersize);
|
||||
LOG_ERROR("Number of data words %" PRIu32 " exceeds available buffersize %"
|
||||
PRIu32, wordcount, buffersize);
|
||||
return ERROR_FLASH_OPERATION_FAILED;
|
||||
}
|
||||
|
||||
@@ -2467,7 +2467,7 @@ static int cfi_write(struct flash_bank *bank, const uint8_t *buffer, uint32_t of
|
||||
|
||||
/* handle unaligned tail bytes */
|
||||
if (count > 0) {
|
||||
LOG_INFO("Fixup %" PRId32 " unaligned tail bytes", count);
|
||||
LOG_INFO("Fixup %" PRIu32 " unaligned tail bytes", count);
|
||||
|
||||
/* read a complete word from flash */
|
||||
retval = cfi_target_read_memory(bank, write_p, 1, current_word);
|
||||
|
||||
Reference in New Issue
Block a user