Skip to content

Commit

Permalink
sdhci: Change debug prints to compile unconditionally
Browse files Browse the repository at this point in the history
Conditional compilation hides few type mismatch warnings, fix it to
compile unconditionally.

Signed-off-by: Sai Pavan Boddu <saipava@xilinx.com>
Suggested-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
saipava authored and Michael Tokarev committed Oct 8, 2015
1 parent be9c5dd commit 7af0fc9
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions hw/sd/sdhci.c
Expand Up @@ -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.
Expand Down

0 comments on commit 7af0fc9

Please sign in to comment.