From: Isaku Yamahata <yamahata@valinux.co.jp>
To: qemu-devel@nongnu.org
Cc: yamahata@valinux.co.jp
Subject: [Qemu-devel] [PATCH 1/6] pci.c: remove unnecessary #ifdef DEBUG_PCI.
Date: Tue, 7 Jul 2009 15:59:22 +0900 [thread overview]
Message-ID: <1246949967-4778-2-git-send-email-yamahata@valinux.co.jp> (raw)
In-Reply-To: <1246949967-4778-1-git-send-email-yamahata@valinux.co.jp>
remove unnecessary #ifdef DEBUG_PCI.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
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
next prev parent reply other threads:[~2009-07-07 8:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-07 6:59 [Qemu-devel] [PATCH 0/6] pci: various clean up and 64bit bar support Isaku Yamahata
2009-07-07 6:59 ` Isaku Yamahata [this message]
2009-07-07 6:59 ` [Qemu-devel] [PATCH 2/6] pci: use uint8_t for pci_register_bar() type argument of int Isaku Yamahata
2009-07-07 6:59 ` [Qemu-devel] [PATCH 3/6] pci: minor clean up of pci_update_mappings() Isaku Yamahata
2009-07-07 6:59 ` [Qemu-devel] [PATCH 4/6] pci: define a constant to represent a unmapped bar and use it Isaku Yamahata
2009-07-07 6:59 ` [Qemu-devel] [PATCH 5/6] pci: use uint64_t for bar addr and size instead of uint32_t Isaku Yamahata
2009-07-07 6:59 ` [Qemu-devel] [PATCH 6/6] pci: 64bit bar support Isaku Yamahata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1246949967-4778-2-git-send-email-yamahata@valinux.co.jp \
--to=yamahata@valinux.co.jp \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).