From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60467) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ0ot-0001D7-TX for qemu-devel@nongnu.org; Mon, 07 Sep 2015 14:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZ0oo-0002qf-UN for qemu-devel@nongnu.org; Mon, 07 Sep 2015 14:07:07 -0400 Received: from mail-bn1on0059.outbound.protection.outlook.com ([157.56.110.59]:44730 helo=na01-bn1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZ0oo-0002qT-QR for qemu-devel@nongnu.org; Mon, 07 Sep 2015 14:07:02 -0400 From: Sai Pavan Boddu Date: Mon, 7 Sep 2015 23:36:41 +0530 Message-ID: <1441649201-13839-2-git-send-email-saipava@xilinx.com> In-Reply-To: <1441649201-13839-1-git-send-email-saipava@xilinx.com> References: <1441649201-13839-1-git-send-email-saipava@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH V4 2/2] sdhci: Change debug prints to compile unconditionally List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, crosthwaitepeter@gmail.com, eblake@redhat.com, peter.maydell@linaro.org Cc: Sai Pavan Boddu , edgari@xilinx.com, alistai@xilinx.com Conditional compilation hides few type mismatch warnings, fix it to compile unconditionally. Signed-off-by: Sai Pavan Boddu Suggested-by: Eric Blake Reviewed-by: Peter Crosthwaite --- Changes for V4: fix the commit message mistakes. --- 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 e6348ef..4c0ddf6 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