qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/4] hw/sh_serial: Use PRIxPLX rather than %x for ph


From: Peter Maydell
Subject: [Qemu-devel] [PATCH 3/4] hw/sh_serial: Use PRIxPLX rather than %x for physaddr
Date: Mon, 25 Jun 2012 13:45:15 +0100

Switch a format string from %x to PRIxPLX 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 <address@hidden>
---
 hw/sh_serial.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/sh_serial.c b/hw/sh_serial.c
index 43b0eb1..6f89696 100644
--- a/hw/sh_serial.c
+++ b/hw/sh_serial.c
@@ -186,7 +186,7 @@ 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" PRIxPLX "\n", 
offs);
     abort();
 }
 
@@ -287,7 +287,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" PRIxPLX "\n", offs);
         abort();
     }
 
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]