Received: from eggs.gnu.org ([208.118.235.92]:54804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tqoe3-0004kI-SZ for qemu-devel@nongnu.org; Thu, 03 Jan 2013 12:31:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tqoe2-000069-A0 for qemu-devel@nongnu.org; Thu, 03 Jan 2013 12:31:55 -0500 Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Alexander Graf In-Reply-To: <1356142552-13453-2-git-send-email-scottwood@freescale.com> Date: Thu, 3 Jan 2013 18:31:49 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <63BC1218-8981-4992-BFEA-CD0BBCB9E7FF@suse.de> References: <1356142552-13453-1-git-send-email-scottwood@freescale.com> <1356142552-13453-2-git-send-email-scottwood@freescale.com> Subject: Re: [Qemu-devel] [PATCH 01/15] openpic: fix debug prints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Scott Wood Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org On 22.12.2012, at 03:15, Scott Wood wrote: > 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. >=20 > Signed-off-by: Scott Wood > --- > hw/openpic.c | 40 ++++++++++++++++++++++++---------------- > 1 file changed, 24 insertions(+), 16 deletions(-) >=20 > 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 static const int debug_openpic =3D 1; #else static const int debug_openpic =3D 0; > #define DPRINTF(fmt, ...) do { printf(fmt , ## __VA_ARGS__); } while = (0) > #else > -#define DPRINTF(fmt, ...) do { } while (0) > +#define DPRINTF(fmt, ...) do { \ > + if (0) { \ if (debug_openpic) > + printf(fmt , ## __VA_ARGS__); \ > + } \ > + } while (0) > #endif That way we don't need to duplicate the print define. Let me fix that up = for you while applying the patch. Alex