From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MO6Vj-00040n-Bt for qemu-devel@nongnu.org; Tue, 07 Jul 2009 04:58:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MO6Vd-0003vP-WB for qemu-devel@nongnu.org; Tue, 07 Jul 2009 04:58:46 -0400 Received: from [199.232.76.173] (port=47984 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MO6Vd-0003v9-Qj for qemu-devel@nongnu.org; Tue, 07 Jul 2009 04:58:41 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:54567) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MO6Vc-00056f-OO for qemu-devel@nongnu.org; Tue, 07 Jul 2009 04:58:41 -0400 From: Isaku Yamahata Date: Tue, 7 Jul 2009 15:59:22 +0900 Message-Id: <1246949967-4778-2-git-send-email-yamahata@valinux.co.jp> In-Reply-To: <1246949967-4778-1-git-send-email-yamahata@valinux.co.jp> References: <1246949967-4778-1-git-send-email-yamahata@valinux.co.jp> Subject: [Qemu-devel] [PATCH 1/6] pci.c: remove unnecessary #ifdef DEBUG_PCI. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: yamahata@valinux.co.jp remove unnecessary #ifdef DEBUG_PCI. Signed-off-by: Isaku Yamahata --- hw/pci.c | 29 +++++++++++++++-------------- 1 files changed, 15 insertions(+), 14 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 4458079..7ee9dde 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -28,6 +28,11 @@ #include "sysemu.h" //#define DEBUG_PCI +#ifdef DEBUG_PCI +# define PCI_DPRINTF(format, ...) printf(format, __VA_ARGS__) +#else +# define PCI_DPRINTF(format, ...) do { } while (0) +#endif struct PCIBus { BusState qbus; @@ -540,9 +545,9 @@ void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len) PCIDevice *pci_dev; int config_addr, bus_num; -#if defined(DEBUG_PCI) && 0 - printf("pci_data_write: addr=%08x val=%08x len=%d\n", - addr, val, len); +#if 0 + PCI_DPRINTF("pci_data_write: addr=%08x val=%08x len=%d\n", + addr, val, len); #endif bus_num = (addr >> 16) & 0xff; while (s && s->bus_num != bus_num) @@ -553,10 +558,8 @@ void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len) if (!pci_dev) return; config_addr = addr & 0xff; -#if defined(DEBUG_PCI) - printf("pci_config_write: %s: addr=%02x val=%08x len=%d\n", - pci_dev->name, config_addr, val, len); -#endif + PCI_DPRINTF("pci_config_write: %s: addr=%02x val=%08x len=%d\n", + pci_dev->name, config_addr, val, len); pci_dev->config_write(pci_dev, config_addr, val, len); } @@ -591,14 +594,12 @@ uint32_t pci_data_read(void *opaque, uint32_t addr, int len) } config_addr = addr & 0xff; val = pci_dev->config_read(pci_dev, config_addr, len); -#if defined(DEBUG_PCI) - printf("pci_config_read: %s: addr=%02x val=%08x len=%d\n", - pci_dev->name, config_addr, val, len); -#endif + PCI_DPRINTF("pci_config_read: %s: addr=%02x val=%08x len=%d\n", + pci_dev->name, config_addr, val, len); the_end: -#if defined(DEBUG_PCI) && 0 - printf("pci_data_read: addr=%08x val=%08x len=%d\n", - addr, val, len); +#if 0 + PCI_DPRINTF("pci_data_read: addr=%08x val=%08x len=%d\n", + addr, val, len); #endif return val; } -- 1.6.0.2