From: Peter Maydell Date: Mon, 25 Jun 2012 15:52:23 +0000 (+0100) Subject: hw/sh_serial: Use TARGET_PRIxPHYS rather than %x for physaddr X-Git-Tag: v1.2.0-rc0~167 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c1950a4e95c57c47a74d010c7c0727320ef2a550;p=users%2Fdwmw2%2Fqemu.git hw/sh_serial: Use TARGET_PRIxPHYS rather than %x for physaddr Switch a format string from %x to TARGET_PRIxPHYS so that it will continue to work even if target_phys_addr_t is changed to 64 bits in the future. Signed-off-by: Peter Maydell Reviewed-by: Andreas Färber Signed-off-by: Blue Swirl --- diff --git a/hw/sh_serial.c b/hw/sh_serial.c index 43b0eb1c1d..1d1883dd20 100644 --- a/hw/sh_serial.c +++ b/hw/sh_serial.c @@ -186,7 +186,8 @@ static void sh_serial_write(void *opaque, target_phys_addr_t offs, } } - fprintf(stderr, "sh_serial: unsupported write to 0x%02x\n", offs); + fprintf(stderr, "sh_serial: unsupported write to 0x%02" + TARGET_PRIxPHYS "\n", offs); abort(); } @@ -287,7 +288,8 @@ static uint64_t sh_serial_read(void *opaque, target_phys_addr_t offs, #endif if (ret & ~((1 << 16) - 1)) { - fprintf(stderr, "sh_serial: unsupported read from 0x%02x\n", offs); + fprintf(stderr, "sh_serial: unsupported read from 0x%02" + TARGET_PRIxPHYS "\n", offs); abort(); }