From patchwork Wed Jan 6 02:39:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 42249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by ozlabs.org (Postfix) with ESMTP id F2C8AB6EEF for ; Wed, 6 Jan 2010 13:45:56 +1100 (EST) Received: from localhost ([127.0.0.1]:54316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSLp7-0004GU-Fn for incoming@patchwork.ozlabs.org; Tue, 05 Jan 2010 21:40:37 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSLoQ-0004Fp-Ec for qemu-devel@nongnu.org; Tue, 05 Jan 2010 21:39:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSLoM-0004Dm-OM for qemu-devel@nongnu.org; Tue, 05 Jan 2010 21:39:54 -0500 Received: from [199.232.76.173] (port=54778 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSLoM-0004Df-Fi for qemu-devel@nongnu.org; Tue, 05 Jan 2010 21:39:50 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:60923) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSLoL-0003iA-9p for qemu-devel@nongnu.org; Tue, 05 Jan 2010 21:39:50 -0500 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id C56C518297; Wed, 6 Jan 2010 11:39:43 +0900 (JST) Received: (nullmailer pid 28778 invoked by uid 1000); Wed, 06 Jan 2010 02:39:52 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org, kraxel@redhat.com, aurelien@aurel32.net Date: Wed, 6 Jan 2010 11:39:50 +0900 Message-Id: <1262745591-28697-27-git-send-email-yamahata@valinux.co.jp> X-Mailer: git-send-email 1.6.5.4 In-Reply-To: <1262745591-28697-1-git-send-email-yamahata@valinux.co.jp> References: <1262745591-28697-1-git-send-email-yamahata@valinux.co.jp> X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: yamahata@valinux.co.jp Subject: [Qemu-devel] [PATCH V12 26/27] apm: remove #ifdef DEBUG. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; }