diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2014-04-15 19:49:11 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-04-17 21:34:07 +0100 |
commit | 6954a1cd97f7669b320967d11833fe0d6d7a742d (patch) | |
tree | 8d5848b1439ab1108fd62f66a380cd3e1f0f6b8c | |
parent | 15e3611e1ca7a3b4d2cee505df83ea2744c2874d (diff) | |
download | hqemu-6954a1cd97f7669b320967d11833fe0d6d7a742d.zip hqemu-6954a1cd97f7669b320967d11833fe0d6d7a742d.tar.gz |
misc: zynq_slcr: Make DB_PRINTs always compile
Change the DB_PRINT macro over to a regular if() rather than
conditional compilation to give constant compile testing of formats.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 942477847353c5cff5f45a228cc88c633dc012f3.1396503037.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/misc/zynq_slcr.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/misc/zynq_slcr.c b/hw/misc/zynq_slcr.c index 06eba08..2e53a2e 100644 --- a/hw/misc/zynq_slcr.c +++ b/hw/misc/zynq_slcr.c @@ -19,14 +19,16 @@ #include "hw/sysbus.h" #include "sysemu/sysemu.h" -#ifdef ZYNQ_ARM_SLCR_ERR_DEBUG +#ifndef ZYNQ_SLCR_ERR_DEBUG +#define ZYNQ_SLCR_ERR_DEBUG 0 +#endif + #define DB_PRINT(...) do { \ - fprintf(stderr, ": %s: ", __func__); \ - fprintf(stderr, ## __VA_ARGS__); \ + if (ZYNQ_SLCR_ERR_DEBUG) { \ + fprintf(stderr, ": %s: ", __func__); \ + fprintf(stderr, ## __VA_ARGS__); \ + } \ } while (0); -#else - #define DB_PRINT(...) -#endif #define XILINX_LOCK_KEY 0x767b #define XILINX_UNLOCK_KEY 0xdf0d |