From e66593f8242d49dd05f6b9c4a5121fa466a158aa Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Tue, 18 Aug 2020 18:56:03 +0200 Subject: 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 Reviewed-on: http://openocd.zylin.com/5816 Tested-by: jenkins --- src/flash/nand/mx3.c | 2 +- src/flash/nand/mxc.c | 2 +- src/flash/nand/tcl.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/flash/nand') diff --git a/src/flash/nand/mx3.c b/src/flash/nand/mx3.c index abeaf15..b9f5ff1 100644 --- a/src/flash/nand/mx3.c +++ b/src/flash/nand/mx3.c @@ -40,7 +40,7 @@ get_next_halfword_from_sram_buffer() not tested static const char target_not_halted_err_msg[] = "target must be halted to use mx3 NAND flash controller"; static const char data_block_size_err_msg[] = - "minimal granularity is one half-word, %" PRId32 " is incorrect"; + "minimal granularity is one half-word, %" PRIu32 " is incorrect"; static const char sram_buffer_bounds_err_msg[] = "trying to access out of SRAM buffer bound (addr=0x%" PRIx32 ")"; static const char get_status_register_err_msg[] = "can't get NAND status"; diff --git a/src/flash/nand/mxc.c b/src/flash/nand/mxc.c index bc2ae93..2c5de03 100644 --- a/src/flash/nand/mxc.c +++ b/src/flash/nand/mxc.c @@ -65,7 +65,7 @@ static const char target_not_halted_err_msg[] = "target must be halted to use mxc NAND flash controller"; static const char data_block_size_err_msg[] = - "minimal granularity is one half-word, %" PRId32 " is incorrect"; + "minimal granularity is one half-word, %" PRIu32 " is incorrect"; static const char sram_buffer_bounds_err_msg[] = "trying to access out of SRAM buffer bound (addr=0x%" PRIx32 ")"; static const char get_status_register_err_msg[] = "can't get NAND status"; diff --git a/src/flash/nand/tcl.c b/src/flash/nand/tcl.c index 5480e0d..ca8b9da 100644 --- a/src/flash/nand/tcl.c +++ b/src/flash/nand/tcl.c @@ -124,7 +124,7 @@ COMMAND_HANDLER(handle_nand_info_command) bad_state = " (block condition unknown)"; command_print(CMD, - "\t#%i: 0x%8.8" PRIx32 " (%" PRId32 "kB) %s%s", + "\t#%i: 0x%8.8" PRIx32 " (%" PRIu32 "kB) %s%s", j, p->blocks[j].offset, p->blocks[j].size / 1024, -- cgit v1.1