Skip to contentSkip to conversation

hw/usb/hcd-ehci: Fix debug printf format string

PATCH In review BALATON Zoltan 2 participants 3 messages Jan 24, 2025 – Jan 30, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 hw/usb/hcd-ehci: Fix debug printf format string

The variable is uint64_t so needs %PRIu64 instead of %d.

Fixes 3ae7eb88c47 ("ehci: fix overflow in frame timer code")

---
v3: Fixed commit message to match what the patch actually does

 hw/usb/hcd-ehci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/usb/hcd-ehci.c +2 -1
index 6c4c14c895..b090f25365 100644
@@ -2287,7 +2287,8 @@ static void ehci_work_bh(void *opaque)
             ehci_update_frindex(ehci, skipped_uframes);
             ehci->last_run_ns += UFRAME_TIMER_NS * skipped_uframes;
             uframes -= skipped_uframes;
-            DPRINTF("WARNING - EHCI skipped %d uframes\n", skipped_uframes);
+            DPRINTF("WARNING - EHCI skipped %"PRIu64" uframes\n",
+                    skipped_uframes);
         }
 
         for (i = 0; i < uframes; i++) {
Signature · 1 line
2.30.9
Reviewed-by on v3 1/1
#1 lore raw
Quoted 10 lines · BALATON Zoltan

The variable is uint64_t so needs %PRIu64 instead of %d.

Fixes 3ae7eb88c47 ("ehci: fix overflow in frame timer code")

---
v3: Fixed commit message to match what the patch actually does

  hw/usb/hcd-ehci.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

and queued, thanks!