]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/sh_serial: Use TARGET_PRIxPHYS rather than %x for physaddr
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 25 Jun 2012 15:52:23 +0000 (16:52 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 14 Jul 2012 10:37:01 +0000 (10:37 +0000)
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 <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/sh_serial.c

index 43b0eb1c1d782813df63a5f180d2cfe875f99903..1d1883dd2067cd808f3333a4c8d0ece1d0a2ac51 100644 (file)
@@ -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();
     }