aboutsummaryrefslogtreecommitdiff
path: root/hw/tpm/tpm_tis.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@linux.vnet.ibm.com>2015-03-31 14:49:10 -0400
committerMichael Tokarev <mjt@tls.msk.ru>2015-04-30 16:05:48 +0300
commit4d1ba9c4f8a4d68b9d053946d551ffa8f1006b77 (patch)
treea14374b719983f05b47732631f1183bd142ef3d6 /hw/tpm/tpm_tis.c
parent070c7607f62f9623be9ff14623a43b0ca195c572 (diff)
tpm: Modify DPRINTF to enable -Wformat checking
Modify DPRINTF to always enable -Wformat checking. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/tpm/tpm_tis.c')
-rw-r--r--hw/tpm/tpm_tis.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index cb9c7c87af..4b6d601204 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -30,15 +30,13 @@
#include "qemu-common.h"
#include "qemu/main-loop.h"
-/*#define DEBUG_TIS */
+#define DEBUG_TIS 0
-#ifdef DEBUG_TIS
-#define DPRINTF(fmt, ...) \
- do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) \
- do { } while (0)
-#endif
+#define DPRINTF(fmt, ...) do { \
+ if (DEBUG_TIS) { \
+ printf(fmt, ## __VA_ARGS__); \
+ } \
+} while (0);
/* whether the STS interrupt is supported */
#define RAISE_STS_IRQ