qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 0/5] tpm: CRB device and cleanups


From: Marc-Andre Lureau
Subject: Re: [Qemu-devel] [PATCH v2 0/5] tpm: CRB device and cleanups
Date: Fri, 19 Jan 2018 15:56:07 +0100

On Fri, Jan 19, 2018 at 3:36 PM,  <address@hidden> wrote:
> /tmp/qemu-test/src/hw/tpm/tpm_crb.c: In function 'tpm_crb_mmio_read':
> /tmp/qemu-test/src/hw/tpm/tpm_crb.c:126:13: error: format '%lx' expects 
> argument of type 'long unsigned int', but argument 2 has type 'hwaddr {aka 
> long long unsigned int}' [-Werror=format=]
>      DPRINTF("CRB read 0x%lx:%s len:%u\n",
>              ^
> /tmp/qemu-test/src/hw/tpm/tpm_crb.c:48:20: note: in definition of macro 
> 'DPRINTF'
>              printf(fmt, ## __VA_ARGS__);        \
>                     ^~~
> /tmp/qemu-test/src/hw/tpm/tpm_crb.c: In function 'tpm_crb_mmio_write':
> /tmp/qemu-test/src/hw/tpm/tpm_crb.c:146:13: error: format '%lx' expects 
> argument of type 'long unsigned int', but argument 2 has type 'hwaddr {aka 
> long long unsigned int}' [-Werror=format=]
>      DPRINTF("CRB write 0x%lx:%s len:%u val:%lu\n",
>              ^
> /tmp/qemu-test/src/hw/tpm/tpm_crb.c:48:20: note: in definition of macro 
> 'DPRINTF'
>              printf(fmt, ## __VA_ARGS__);        \
>                     ^~~
> /tmp/qemu-test/src/hw/tpm/tpm_crb.c:146:13: error: format '%lu' expects 
> argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka 
> long long unsigned int}' [-Werror=format=]
>      DPRINTF("CRB write 0x%lx:%s len:%u val:%lu\n",
>              ^
> /tmp/qemu-test/src/hw/tpm/tpm_crb.c:48:20: note: in definition of macro 
> 'DPRINTF'
>              printf(fmt, ## __VA_ARGS__);        \
>                     ^~~

This will fix it:
Stefan feel free to squash it if no further changes required

--- a/hw/tpm/tpm_crb.c
+++ b/hw/tpm/tpm_crb.c
@@ -123,7 +123,7 @@ static uint64_t tpm_crb_mmio_read(void *opaque, hwaddr addr,
                                   unsigned size)
 {
     CRBState *s = CRB(opaque);
-    DPRINTF("CRB read 0x%lx:%s len:%u\n",
+    DPRINTF("CRB read 0x" TARGET_FMT_plx ":%s len:%u\n",
             addr, addr_desc(addr), size);
     void *regs = (void *)&s->regs + addr;

@@ -143,7 +143,7 @@ static void tpm_crb_mmio_write(void *opaque, hwaddr addr,
                                uint64_t val, unsigned size)
 {
     CRBState *s = CRB(opaque);
-    DPRINTF("CRB write 0x%lx:%s len:%u val:%lu\n",
+    DPRINTF("CRB write 0x" TARGET_FMT_plx ":%s len:%u val:%" PRIu64 "\n",
             addr, addr_desc(addr), size, val);

     switch (addr) {



reply via email to

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