From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TqqfZ-0008L1-Gn for qemu-devel@nongnu.org; Thu, 03 Jan 2013 14:41:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TqqfX-00055d-2I for qemu-devel@nongnu.org; Thu, 03 Jan 2013 14:41:37 -0500 Date: Thu, 3 Jan 2013 13:41:14 -0600 From: Scott Wood References: <1356142552-13453-1-git-send-email-scottwood@freescale.com> <1356142552-13453-2-git-send-email-scottwood@freescale.com> <63BC1218-8981-4992-BFEA-CD0BBCB9E7FF@suse.de> In-Reply-To: <63BC1218-8981-4992-BFEA-CD0BBCB9E7FF@suse.de> (from agraf@suse.de on Thu Jan 3 11:31:49 2013) Message-ID: <1357242074.22404.2@snotra> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 01/15] openpic: fix debug prints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 01/03/2013 11:31:49 AM, Alexander Graf wrote: >=20 > On 22.12.2012, at 03:15, Scott Wood wrote: >=20 > > Fix various format errors when debug prints are enabled. Also > > cause error checking to happen even when debug prints are not > > enabled, and consistently use 0x for hex output. > > > > Signed-off-by: Scott Wood > > --- > > hw/openpic.c | 40 ++++++++++++++++++++++++---------------- > > 1 file changed, 24 insertions(+), 16 deletions(-) > > > > diff --git a/hw/openpic.c b/hw/openpic.c > > index 93e8208..72a5bc9 100644 > > --- a/hw/openpic.c > > +++ b/hw/openpic.c > > @@ -45,7 +45,11 @@ > > #ifdef DEBUG_OPENPIC >=20 > static const int debug_openpic =3D 1; > #else > static const int debug_openpic =3D 0; >=20 > > #define DPRINTF(fmt, ...) do { printf(fmt , ## __VA_ARGS__); } =20 > while (0) > > #else > > -#define DPRINTF(fmt, ...) do { } while (0) > > +#define DPRINTF(fmt, ...) do { \ > > + if (0) { \ >=20 > if (debug_openpic) >=20 > > + printf(fmt , ## __VA_ARGS__); \ > > + } \ > > + } while (0) > > #endif >=20 > That way we don't need to duplicate the print define. Let me fix that =20 > up for you while applying the patch. OK, thanks. -Scott=