Skip to contentSkip to conversation

xhci: fix bad print specifier

PATCH Applied Hervé Poussineau 4 participants 4 messages Feb 21, 2013 – Feb 23, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xhci: fix bad print specifier

This fixes the following compilation error:
hw/usb/hcd-xhci.c:1156:17: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘unsigned int’

---
 hw/usb/hcd-xhci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/usb/hcd-xhci.c +2 -2
index 5796102..07afdee 100644
@@ -1152,8 +1152,8 @@ static XHCIStreamContext *xhci_find_stream(XHCIEPContext *epctx,
 
     if (sctx->sct == -1) {
         xhci_dma_read_u32s(epctx->xhci, sctx->pctx, ctx, sizeof(ctx));
-        fprintf(stderr, "%s: init sctx #%d @ %lx: %08x %08x\n", __func__,
-                streamid, sctx->pctx, ctx[0], ctx[1]);
+        fprintf(stderr, "%s: init sctx #%d @ " DMA_ADDR_FMT ": %08x %08x\n",
+                __func__, streamid, sctx->pctx, ctx[0], ctx[1]);
         sct = (ctx[0] >> 1) & 0x07;
         if (epctx->lsa && sct != 1) {
             *cc_error = CC_INVALID_STREAM_TYPE_ERROR;
Signature · 1 line
1.7.10.4
Reviewed-by on v1 1/1
#1 lore raw

Am 21.02.2013 22:58, schrieb Hervé Poussineau:

Quoted 14 lines

This fixes the following compilation error:
hw/usb/hcd-xhci.c:1156:17: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘unsigned int’

---
 hw/usb/hcd-xhci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/usb/hcd-xhci.c +0 -0
index 5796102..07afdee 100644

hw/usb/hcd-xhci.c static XHCIStreamContext *xhci_find_stream(XHCIEPContext *epctx, · line 1159

Quoted 10 lines
hw/usb/hcd-xhci.c +2 -2
@@ -1152,8 +1152,8 @@ static XHCIStreamContext *xhci_find_stream(XHCIEPContext *epctx,
 
     if (sctx->sct == -1) {
         xhci_dma_read_u32s(epctx->xhci, sctx->pctx, ctx, sizeof(ctx));
-        fprintf(stderr, "%s: init sctx #%d @ %lx: %08x %08x\n", __func__,
-                streamid, sctx->pctx, ctx[0], ctx[1]);
+        fprintf(stderr, "%s: init sctx #%d @ " DMA_ADDR_FMT ": %08x %08x\n",
+                __func__, streamid, sctx->pctx, ctx[0], ctx[1]);
         sct = (ctx[0] >> 1) & 0x07;
         if (epctx->lsa && sct != 1) {
             *cc_error = CC_INVALID_STREAM_TYPE_ERROR;

Anthony, this is a build regression in git master, so we should not wait for qemu-trivial to apply it.

Thanks,

Stefan

Applied
#3 lore raw
In reply to Hervé Poussineau

Thanks, applied.

Quoted 28 lines · Hervé Poussineau

This fixes the following compilation error:
hw/usb/hcd-xhci.c:1156:17: error: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘unsigned int’

---
 hw/usb/hcd-xhci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/usb/hcd-xhci.c +2 -3
index 5796102..07afdee 100644
@@ -1152,8 +1152,8 @@ static XHCIStreamContext *xhci_find_stream(XHCIEPContext *epctx,
 
     if (sctx->sct == -1) {
         xhci_dma_read_u32s(epctx->xhci, sctx->pctx, ctx, sizeof(ctx));
-        fprintf(stderr, "%s: init sctx #%d @ %lx: %08x %08x\n", __func__,
-                streamid, sctx->pctx, ctx[0], ctx[1]);
+        fprintf(stderr, "%s: init sctx #%d @ " DMA_ADDR_FMT ": %08x %08x\n",
+                __func__, streamid, sctx->pctx, ctx[0], ctx[1]);
         sct = (ctx[0] >> 1) & 0x07;
         if (epctx->lsa && sct != 1) {
             *cc_error = CC_INVALID_STREAM_TYPE_ERROR;
--

1.7.10.4