From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk9B9-0000GF-8r for qemu-devel@nongnu.org; Tue, 13 May 2014 05:39:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wk9B0-0000IX-16 for qemu-devel@nongnu.org; Tue, 13 May 2014 05:39:19 -0400 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:58297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wk9Az-0000IR-R6 for qemu-devel@nongnu.org; Tue, 13 May 2014 05:39:09 -0400 Received: by mail-we0-f182.google.com with SMTP id t60so90940wes.27 for ; Tue, 13 May 2014 02:39:08 -0700 (PDT) Date: Tue, 13 May 2014 11:39:04 +0200 From: Marc =?UTF-8?B?TWFyw60=?= Message-ID: <20140513113904.6f2a56d2@crunchbang> In-Reply-To: <1399964572-5376-9-git-send-email-marc.mari.barcelo@gmail.com> References: <1399964572-5376-1-git-send-email-marc.mari.barcelo@gmail.com> <1399964572-5376-9-git-send-email-marc.mari.barcelo@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 08/16] tpm: Convert conditional compilation of debug printfs to regular ifs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marc =?UTF-8?B?TWFyw60=?= Cc: Stefan Hajnoczi , Peter Crosthwaite , qemu-devel@nongnu.org, Andreas =?UTF-8?B?RsOkcmJlcg==?= El Tue, 13 May 2014 09:02:44 +0200 Marc Mar=C3=AD escribi=C3=B3: > diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c > index 6f0a4d2..302f2bf 100644 > --- a/hw/tpm/tpm_tis.c > +++ b/hw/tpm/tpm_tis.c > @@ -30,16 +30,16 @@ > #include "qemu-common.h" > #include "qemu/main-loop.h" > =20 > -/*#define DEBUG_TIS */ > +/*#define DEBUG_TIS*/ > =20 > #ifdef DEBUG_TIS > -#define DPRINTF(fmt, ...) \ > - do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) > +#define DEBUG_TIS_ENABLED 1 > #else > -#define DPRINTF(fmt, ...) \ > - do { } while (0) > +#define DEBUG_TIS_ENABLED 0 > #endif > =20 > +#define DPRINTF(fmt, ...) QEMU_DPRINTF(DEBUG_TIS_ENABLED, "tpm-tis", > fmt, ## __VA_ARGS__) + > /* whether the STS interrupt is supported */ > #define RAISE_STS_IRQ > =20 I saw that later in that file there are some DPRINTF that do not add a \n at the end (for example in L.141). As this codes are already in a #ifdef DEBUG_TIS, some of this DPRINTFs can be changed to fprintf in next versions. Marc