Patchwork [5/8] serial: Fix debug format strings

login
register
mail settings
Submitter Stefan Hajnoczi
Date March 22, 2013, 3:14 p.m.
Message ID <1363965261-22267-6-git-send-email-stefanha@redhat.com>
Download mbox | patch
Permalink /patch/230086/
State New
Headers show

Comments

Stefan Hajnoczi - March 22, 2013, 3:14 p.m.
From: Kevin Wolf <kwolf@redhat.com>

This fixes the build of hw/serial.c with DEBUG_SERIAL enabled.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/serial.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/serial.c b/hw/serial.c
index 48a5eb6..0ccc499 100644
--- a/hw/serial.c
+++ b/hw/serial.c
@@ -306,7 +306,7 @@  static void serial_ioport_write(void *opaque, hwaddr addr, uint64_t val,
     SerialState *s = opaque;
 
     addr &= 7;
-    DPRINTF("write addr=0x%02x val=0x%02x\n", addr, val);
+    DPRINTF("write addr=0x%" HWADDR_PRIx " val=0x%" PRIx64 "\n", addr, val);
     switch(addr) {
     default:
     case 0:
@@ -527,7 +527,7 @@  static uint64_t serial_ioport_read(void *opaque, hwaddr addr, unsigned size)
         ret = s->scr;
         break;
     }
-    DPRINTF("read addr=0x%02x val=0x%02x\n", addr, ret);
+    DPRINTF("read addr=0x%" HWADDR_PRIx " val=0x%02x\n", addr, ret);
     return ret;
 }