From patchwork Thu Dec 24 08:09:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 41758 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 54E0DB7BF8 for ; Thu, 24 Dec 2009 19:58:57 +1100 (EST) Received: from localhost ([127.0.0.1]:54161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNjX3-0002S0-OB for incoming@patchwork.ozlabs.org; Thu, 24 Dec 2009 03:58:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNilW-00028f-Ja for qemu-devel@nongnu.org; Thu, 24 Dec 2009 03:09:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNilM-00020K-Vj for qemu-devel@nongnu.org; Thu, 24 Dec 2009 03:09:44 -0500 Received: from [199.232.76.173] (port=42940 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNilK-0001y9-2c for qemu-devel@nongnu.org; Thu, 24 Dec 2009 03:09:34 -0500 Received: from mx20.gnu.org ([199.232.41.8]:42070) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NNilK-0004Wu-1w for qemu-devel@nongnu.org; Thu, 24 Dec 2009 03:09:34 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NNilJ-0007hn-2O for qemu-devel@nongnu.org; Thu, 24 Dec 2009 03:09:33 -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 4FD0F106AC6; Thu, 24 Dec 2009 17:09:24 +0900 (JST) Received: (nullmailer pid 22835 invoked by uid 1000); Thu, 24 Dec 2009 08:09:20 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org, kraxel@redhat.com Date: Thu, 24 Dec 2009 17:09:19 +0900 Message-Id: <1261642160-22754-27-git-send-email-yamahata@valinux.co.jp> X-Mailer: git-send-email 1.6.5.4 In-Reply-To: <1261642160-22754-1-git-send-email-yamahata@valinux.co.jp> References: <1261642160-22754-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 mx20.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: yamahata@valinux.co.jp Subject: [Qemu-devel] [PATCH V10 26/27] pc_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 --- hw/pc_apm.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/pc_apm.c b/hw/pc_apm.c index f6bcd7d..e1cee96 100644 --- a/hw/pc_apm.c +++ b/hw/pc_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; }