[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 03/19] sdhci: Change debug prints to compile uncond
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 03/19] sdhci: Change debug prints to compile unconditionally |
Date: |
Thu, 8 Oct 2015 19:52:12 +0300 |
From: Sai Pavan Boddu <address@hidden>
Conditional compilation hides few type mismatch warnings, fix it to
compile unconditionally.
Signed-off-by: Sai Pavan Boddu <address@hidden>
Suggested-by: Eric Blake <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
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 436448c..8b0f9f0 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.
--
2.1.4
- [Qemu-trivial] [PULL 00/19] Trivial patches for 2015-10-08, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 10/19] target-ppc: Remove unnecessary variable, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 03/19] sdhci: Change debug prints to compile unconditionally,
Michael Tokarev <=
- [Qemu-trivial] [PULL 12/19] qapi: add missing @, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 09/19] target-microblaze: Remove unnecessary variable, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 14/19] hw: char: Remove unnecessary variable, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 13/19] hw: timer: Remove unnecessary variable, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 05/19] block/ssh: remove dead code, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 07/19] pc: check for underflow in load_linux, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 17/19] linux-user: Use g_new() & friends where that makes obvious sense, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 02/19] sdhci: use PRIx64 for uint64_t type, Michael Tokarev, 2015/10/08
- [Qemu-trivial] [PULL 11/19] MAINTAINERS: Add NSIS file for W32, W64 hosts, Michael Tokarev, 2015/10/08
- Re: [Qemu-trivial] [Qemu-devel] [PULL 00/19] Trivial patches for 2015-10-08, Peter Maydell, 2015/10/09