Received: from eggs.gnu.org ([2001:4830:134:3::10]:51364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWjBG-0007Ql-HH for qemu-devel@nongnu.org; Wed, 24 Sep 2014 05:48:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWjBA-0000GA-A9 for qemu-devel@nongnu.org; Wed, 24 Sep 2014 05:48:14 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:61643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWjBA-0000FW-3Y for qemu-devel@nongnu.org; Wed, 24 Sep 2014 05:48:08 -0400 Received: by mail-wi0-f181.google.com with SMTP id z2so6850833wiv.8 for ; Wed, 24 Sep 2014 02:48:02 -0700 (PDT) Date: Wed, 24 Sep 2014 10:47:59 +0100 From: Stefan Hajnoczi Message-ID: <20140924094759.GG21137@stefanha-thinkpad.redhat.com> References: <1411467581-2982-1-git-send-email-aik@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tvOENZuN7d6HfOWU" Content-Disposition: inline In-Reply-To: <1411467581-2982-1-git-send-email-aik@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-devel@nongnu.org, Gerd Hoffmann --tvOENZuN7d6HfOWU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 23, 2014 at 08:19:41PM +1000, Alexey Kardashevskiy wrote: > This adds a stub for ohci_td_pkt() function (which traces packets) > when configured without --enable-trace-backend >=20 > Signed-off-by: Alexey Kardashevskiy > --- >=20 > It should probably be squashed to > [PATCH] ohci: Convert fprint/DPRINTF/print to traces >=20 > Sorry about that... >=20 > --- > hw/usb/hcd-ohci.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > 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, struc= t ohci_ed *ed, > return 1; > } > =20 > +#ifdef trace_event_get_state > static void ohci_td_pkt(const char *msg, const uint8_t *buf, size_t len) > { > bool print16 =3D !!trace_event_get_state(TRACE_USB_OHCI_TD_PKT_SHORT= ); The preferred define for this is CONFIG_TRACE_NOP. Checking for trace_event_get_state could break if trace/control.h changes in the future. Stefan --tvOENZuN7d6HfOWU Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUIpNPAAoJEJykq7OBq3PIdLkIAIBeyJDzV2k4z6R1e5xio6RJ PFytMUmsJF6eY4sebO3+T9NBEBML7CMHdUWDRt6FmPeWNn6kFSYJjwY0Qb3wQU9P F1JlxDloTBmQeHRsJZxh/3Yo6ZptR15jObWLuukOwIS+38GAGXpP4fHoe4Voef4d HUzqYSX2PbHHreXQdU0ElY+ZQITPuyTPw2srXH2XaPdoQ59x4YVFp8iMZ2mTDxfw IjOS2x+JiAOj+IFdIL9JRrSWP0jV6l0ZGdFelftOvE6KnnMOQbtZEBYoiUp8KWvC L903GWVbL0EMj4ufe7a662W0xoQVkJog8petv1rzEKx5GOtkzaPJQqG66EQ/wxE= =qTUE -----END PGP SIGNATURE----- --tvOENZuN7d6HfOWU--