qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-trivial] [Qemu-devel] [PATCH] serial: Fix debug format strings
       [not found] <1363692343-22299-1-git-send-email-kwolf@redhat.com>
@ 2013-03-19 12:51 ` Markus Armbruster
  2013-03-19 13:29 ` Andreas Färber
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Armbruster @ 2013-03-19 12:51 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-trivial, qemu-devel

Cc'ing qemu-trivial

Kevin Wolf <kwolf@redhat.com> writes:

> This fixes the build of hw/serial.c with DEBUG_SERIAL enabled.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  hw/serial.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> 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;
>  }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] serial: Fix debug format strings
       [not found] <1363692343-22299-1-git-send-email-kwolf@redhat.com>
  2013-03-19 12:51 ` [Qemu-trivial] [Qemu-devel] [PATCH] serial: Fix debug format strings Markus Armbruster
@ 2013-03-19 13:29 ` Andreas Färber
  2013-03-19 13:42   ` Kevin Wolf
  1 sibling, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2013-03-19 13:29 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-trivial, qemu-devel

Am 19.03.2013 12:25, schrieb Kevin Wolf:
> This fixes the build of hw/serial.c with DEBUG_SERIAL enabled.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  hw/serial.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> 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);

Are you intentionally dropping 02 in both places? That changes output FWIW.

Andreas

>      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;
>  }
>  
> 


-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] serial: Fix debug format strings
  2013-03-19 13:29 ` Andreas Färber
@ 2013-03-19 13:42   ` Kevin Wolf
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2013-03-19 13:42 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-trivial, qemu-devel

Am 19.03.2013 um 14:29 hat Andreas Färber geschrieben:
> Am 19.03.2013 12:25, schrieb Kevin Wolf:
> > This fixes the build of hw/serial.c with DEBUG_SERIAL enabled.
> > 
> > Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> > ---
> >  hw/serial.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > 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);
> 
> Are you intentionally dropping 02 in both places? That changes output FWIW.

%02 for 64 bit values felt odd, but I think they might be guaranteed to
be small enough in practice. If you really prefer, I can send a v2 which
adds it back. But it's only debug code, so... *shrug*

Kevin


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-19 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1363692343-22299-1-git-send-email-kwolf@redhat.com>
2013-03-19 12:51 ` [Qemu-trivial] [Qemu-devel] [PATCH] serial: Fix debug format strings Markus Armbruster
2013-03-19 13:29 ` Andreas Färber
2013-03-19 13:42   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).