qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-bac


From: Alexey Kardashevskiy
Subject: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend
Date: Tue, 23 Sep 2014 20:19:41 +1000

This adds a stub for ohci_td_pkt() function (which traces packets)
when configured without --enable-trace-backend

Signed-off-by: Alexey Kardashevskiy <address@hidden>
---

It should probably be squashed to
[PATCH] ohci: Convert fprint/DPRINTF/print to traces

Sorry about that...

---
 hw/usb/hcd-ohci.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index 4a4dd02..7ea871d 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -920,6 +920,7 @@ static int ohci_service_iso_td(OHCIState *ohci, struct 
ohci_ed *ed,
     return 1;
 }
 
+#ifdef trace_event_get_state
 static void ohci_td_pkt(const char *msg, const uint8_t *buf, size_t len)
 {
     bool print16 = !!trace_event_get_state(TRACE_USB_OHCI_TD_PKT_SHORT);
@@ -950,6 +951,11 @@ static void ohci_td_pkt(const char *msg, const uint8_t 
*buf, size_t len)
         p += sprintf(p, " %.2x", buf[i]);
     }
 }
+#else
+static void ohci_td_pkt(const char *msg, const uint8_t *buf, size_t len)
+{
+}
+#endif
 
 /* Service a transport descriptor.
    Returns nonzero to terminate processing of this endpoint.  */
-- 
2.0.0




reply via email to

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