From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ06w-0007Jv-GR for qemu-devel@nongnu.org; Mon, 07 Sep 2015 13:21:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZ06v-0003Se-IA for qemu-devel@nongnu.org; Mon, 07 Sep 2015 13:21:42 -0400 MIME-Version: 1.0 In-Reply-To: <1441608340-26983-2-git-send-email-saipava@xilinx.com> References: <1441608340-26983-1-git-send-email-saipava@xilinx.com> <1441608340-26983-2-git-send-email-saipava@xilinx.com> Date: Mon, 7 Sep 2015 10:21:40 -0700 Message-ID: From: Peter Crosthwaite Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH V3 2/2] sdhci: Change debug prints to compile unconditionally List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sai Pavan Boddu , qemu-trivial@nongnu.org Cc: Peter Maydell , "qemu-devel@nongnu.org Developers" , Sai Pavan Boddu , Edgar Iglesias , Alistair Francis On Sun, Sep 6, 2015 at 11:45 PM, Sai Pavan Boddu wrote: > Conditionaly compilation hides few type mismatch warnings, fix it to "conditional" > compile unconditioinal. > "unconditionally" > Signed-off-by: Sai Pavan Boddu > Suggested-by: Eric Blake Otherwise: Reviewed-by: Peter Crosthwaite Can trivial take these two? Regards, Peter > --- > hw/sd/sdhci.c | 36 ++++++++++++++++++------------------ > 1 file changed, 18 insertions(+), 18 deletions(-) > > diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c > index 639feee..3ad6c76 100644 > --- a/hw/sd/sdhci.c > +++ b/hw/sd/sdhci.c > @@ -37,24 +37,24 @@ > #define SDHC_DEBUG 0 > #endif > > -#if SDHC_DEBUG == 0 > - #define DPRINT_L1(fmt, args...) do { } while (0) > - #define DPRINT_L2(fmt, args...) do { } while (0) > - #define ERRPRINT(fmt, args...) do { } while (0) > -#elif SDHC_DEBUG == 1 > - #define DPRINT_L1(fmt, args...) \ > - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) > - #define DPRINT_L2(fmt, args...) do { } while (0) > - #define ERRPRINT(fmt, args...) \ > - do {fprintf(stderr, "QEMU SDHC ERROR: "fmt, ## args); } while (0) > -#else > - #define DPRINT_L1(fmt, args...) \ > - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) > - #define DPRINT_L2(fmt, args...) \ > - do {fprintf(stderr, "QEMU SDHC: "fmt, ## args); } while (0) > - #define ERRPRINT(fmt, args...) \ > - do {fprintf(stderr, "QEMU SDHC ERROR: "fmt, ## args); } while (0) > -#endif > +#define DPRINT_L1(fmt, args...) \ > + do { \ > + if (SDHC_DEBUG) { \ > + fprintf(stderr, "QEMU SDHC: " fmt, ## args); \ > + } \ > + } while (0) > +#define DPRINT_L2(fmt, args...) \ > + do { \ > + if (SDHC_DEBUG > 1) { \ > + fprintf(stderr, "QEMU SDHC: " fmt, ## args); \ > + } \ > + } while (0) > +#define ERRPRINT(fmt, args...) \ > + do { \ > + if (SDHC_DEBUG) { \ > + fprintf(stderr, "QEMU SDHC ERROR: " fmt, ## args); \ > + } \ > + } while (0) > > /* Default SD/MMC host controller features information, which will be > * presented in CAPABILITIES register of generic SD host controller at reset. > -- > 1.9.1 >