From: Dov Murik <dovmurik@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Dov Murik <dovmurik@linux.vnet.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH 2/2] hw/timer/hpet: Fix debug format strings
Date: Wed, 9 Sep 2020 08:36:50 +0000 [thread overview]
Message-ID: <20200909083650.46771-3-dovmurik@linux.vnet.ibm.com> (raw)
In-Reply-To: <20200909083650.46771-1-dovmurik@linux.vnet.ibm.com>
Fix compiler errors when compiling with -DHPET_DEBUG due to mismatch
between format string token "%x" and the argument type uint64_t.
Also "%#x" is replaced by "0x%" PRIx64 according to the coding style.
Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
---
hw/timer/hpet.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c
index b683f64f1d..73d2168c32 100644
--- a/hw/timer/hpet.c
+++ b/hw/timer/hpet.c
@@ -495,7 +495,8 @@ static void hpet_ram_write(void *opaque, hwaddr addr,
HPETState *s = opaque;
uint64_t old_val, new_val, val, index;
- DPRINTF("qemu: Enter hpet_ram_writel at %" PRIx64 " = %#x\n", addr, value);
+ DPRINTF("qemu: Enter hpet_ram_writel at %" PRIx64 " = 0x%" PRIx64 "\n",
+ addr, value);
index = addr;
old_val = hpet_ram_read(opaque, addr, 4);
new_val = value;
@@ -505,7 +506,7 @@ static void hpet_ram_write(void *opaque, hwaddr addr,
uint8_t timer_id = (addr - 0x100) / 0x20;
HPETTimer *timer = &s->timer[timer_id];
- DPRINTF("qemu: hpet_ram_writel timer_id = %#x\n", timer_id);
+ DPRINTF("qemu: hpet_ram_writel timer_id = 0x%x\n", timer_id);
if (timer_id > s->num_timers) {
DPRINTF("qemu: timer id out of range\n");
return;
@@ -637,8 +638,8 @@ static void hpet_ram_write(void *opaque, hwaddr addr,
}
s->hpet_counter =
(s->hpet_counter & 0xffffffff00000000ULL) | value;
- DPRINTF("qemu: HPET counter written. ctr = %#x -> %" PRIx64 "\n",
- value, s->hpet_counter);
+ DPRINTF("qemu: HPET counter written. ctr = 0x%" PRIx64 " -> "
+ "%" PRIx64 "\n", value, s->hpet_counter);
break;
case HPET_COUNTER + 4:
if (hpet_enabled(s)) {
@@ -646,8 +647,8 @@ static void hpet_ram_write(void *opaque, hwaddr addr,
}
s->hpet_counter =
(s->hpet_counter & 0xffffffffULL) | (((uint64_t)value) << 32);
- DPRINTF("qemu: HPET counter + 4 written. ctr = %#x -> %" PRIx64 "\n",
- value, s->hpet_counter);
+ DPRINTF("qemu: HPET counter + 4 written. ctr = 0x%" PRIx64 " -> "
+ "%" PRIx64 "\n", value, s->hpet_counter);
break;
default:
DPRINTF("qemu: invalid hpet_ram_writel\n");
--
2.20.1
next prev parent reply other threads:[~2020-09-09 8:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 8:36 [PATCH 0/2] hw/timer/hpet: Fix compiler errors with -DHPET_DEBUG Dov Murik
2020-09-09 8:36 ` [PATCH 1/2] hw/timer/hpet: Remove unused functions hpet_ram_readb, hpet_ram_readw Dov Murik
2020-09-09 8:36 ` Dov Murik [this message]
2020-09-09 17:24 ` [PATCH 0/2] hw/timer/hpet: Fix compiler errors with -DHPET_DEBUG Philippe Mathieu-Daudé
2020-09-10 12:53 ` Dov Murik
2020-09-13 11:42 ` Philippe Mathieu-Daudé
2020-09-16 9:15 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200909083650.46771-3-dovmurik@linux.vnet.ibm.com \
--to=dovmurik@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).