coding style: fix print of hex values as decimal
It is an error to prefix with "0x" the print of values in decimal. Replace the incorrect decimal format specifier with PRIx32. Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types PRINTF_0XDECIMAL -f {} \; Change-Id: I2eb867ef654527b2737ba573a405ec8f97c6a739 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5624 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
parent
f29d157882
commit
bf34629294
|
@ -817,7 +817,7 @@ static int pic32mx_info(struct flash_bank *bank, char *buf, int buf_size)
|
|||
|
||||
if (((device_id >> 1) & 0x7ff) != PIC32MX_MANUF_ID) {
|
||||
snprintf(buf, buf_size,
|
||||
"Cannot identify target as a PIC32MX family (manufacturer 0x%03d != 0x%03d)\n",
|
||||
"Cannot identify target as a PIC32MX family (manufacturer 0x%03x != 0x%03x)\n",
|
||||
(unsigned)((device_id >> 1) & 0x7ff),
|
||||
PIC32MX_MANUF_ID);
|
||||
return ERROR_FLASH_OPERATION_FAILED;
|
||||
|
|
|
@ -497,7 +497,7 @@ static int image_elf_read_section(struct image *image,
|
|||
if (offset < field32(elf, segment->p_filesz)) {
|
||||
/* maximal size present in file for the current segment */
|
||||
read_size = MIN(size, field32(elf, segment->p_filesz) - offset);
|
||||
LOG_DEBUG("read elf: size = 0x%zu at 0x%" PRIx32 "", read_size,
|
||||
LOG_DEBUG("read elf: size = 0x%zx at 0x%" PRIx32 "", read_size,
|
||||
field32(elf, segment->p_offset) + offset);
|
||||
/* read initialized area of the segment */
|
||||
retval = fileio_seek(elf->fileio, field32(elf, segment->p_offset) + offset);
|
||||
|
|
Loading…
Reference in New Issue