From patchwork Wed Jan 6 02:39:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [V12,26/27] apm: remove #ifdef DEBUG. Date: Tue, 05 Jan 2010 16:39:50 -0000 From: Isaku Yamahata X-Patchwork-Id: 42249 Message-Id: <1262745591-28697-27-git-send-email-yamahata@valinux.co.jp> To: qemu-devel@nongnu.org, kraxel@redhat.com, aurelien@aurel32.net Cc: yamahata@valinux.co.jp remove #ifdef DEBUG by using macro. Signed-off-by: Isaku Yamahata Acked-by: Gerd Hoffmann --- hw/apm.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/apm.c b/hw/apm.c index d20db3d..3cbde43 100644 --- a/hw/apm.c +++ b/hw/apm.c @@ -23,6 +23,12 @@ //#define DEBUG +#ifdef DEBUG +# define APM_DPRINTF(format, ...) printf(format, ## __VA_ARGS__) +#else +# define APM_DPRINTF(format, ...) do { } while (0) +#endif + /* fixed I/O location */ #define APM_CNT_IOPORT 0xb2 #define APM_STS_IOPORT 0xb3 @@ -31,9 +37,7 @@ static void apm_ioport_writeb(void *opaque, uint32_t addr, uint32_t val) { APMState *apm = opaque; addr &= 1; -#ifdef DEBUG - printf("apm_ioport_writeb addr=0x%x val=0x%02x\n", addr, val); -#endif + APM_DPRINTF("apm_ioport_writeb addr=0x%x val=0x%02x\n", addr, val); if (addr == 0) { apm->apmc = val; @@ -56,9 +60,7 @@ static uint32_t apm_ioport_readb(void *opaque, uint32_t addr) } else { val = apm->apms; } -#ifdef DEBUG - printf("apm_ioport_readb addr=0x%x val=0x%02x\n", addr, val); -#endif + APM_DPRINTF("apm_ioport_readb addr=0x%x val=0x%02x\n", addr, val); return val; }