Commit d8d2e079fada8ae97ecc655e6870621ee8099d47
Committed by
Anthony Liguori
1 parent
45566e9c
pci.c: remove unnecessary #ifdef DEBUG_PCI.
remove unnecessary #ifdef DEBUG_PCI. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
15 additions
and
14 deletions
hw/pci.c
... | ... | @@ -28,6 +28,11 @@ |
28 | 28 | #include "sysemu.h" |
29 | 29 | |
30 | 30 | //#define DEBUG_PCI |
31 | +#ifdef DEBUG_PCI | |
32 | +# define PCI_DPRINTF(format, ...) printf(format, __VA_ARGS__) | |
33 | +#else | |
34 | +# define PCI_DPRINTF(format, ...) do { } while (0) | |
35 | +#endif | |
31 | 36 | |
32 | 37 | struct PCIBus { |
33 | 38 | BusState qbus; |
... | ... | @@ -548,9 +553,9 @@ void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len) |
548 | 553 | PCIDevice *pci_dev; |
549 | 554 | int config_addr, bus_num; |
550 | 555 | |
551 | -#if defined(DEBUG_PCI) && 0 | |
552 | - printf("pci_data_write: addr=%08x val=%08x len=%d\n", | |
553 | - addr, val, len); | |
556 | +#if 0 | |
557 | + PCI_DPRINTF("pci_data_write: addr=%08x val=%08x len=%d\n", | |
558 | + addr, val, len); | |
554 | 559 | #endif |
555 | 560 | bus_num = (addr >> 16) & 0xff; |
556 | 561 | while (s && s->bus_num != bus_num) |
... | ... | @@ -561,10 +566,8 @@ void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len) |
561 | 566 | if (!pci_dev) |
562 | 567 | return; |
563 | 568 | config_addr = addr & 0xff; |
564 | -#if defined(DEBUG_PCI) | |
565 | - printf("pci_config_write: %s: addr=%02x val=%08x len=%d\n", | |
566 | - pci_dev->name, config_addr, val, len); | |
567 | -#endif | |
569 | + PCI_DPRINTF("pci_config_write: %s: addr=%02x val=%08x len=%d\n", | |
570 | + pci_dev->name, config_addr, val, len); | |
568 | 571 | pci_dev->config_write(pci_dev, config_addr, val, len); |
569 | 572 | } |
570 | 573 | |
... | ... | @@ -599,14 +602,12 @@ uint32_t pci_data_read(void *opaque, uint32_t addr, int len) |
599 | 602 | } |
600 | 603 | config_addr = addr & 0xff; |
601 | 604 | val = pci_dev->config_read(pci_dev, config_addr, len); |
602 | -#if defined(DEBUG_PCI) | |
603 | - printf("pci_config_read: %s: addr=%02x val=%08x len=%d\n", | |
604 | - pci_dev->name, config_addr, val, len); | |
605 | -#endif | |
605 | + PCI_DPRINTF("pci_config_read: %s: addr=%02x val=%08x len=%d\n", | |
606 | + pci_dev->name, config_addr, val, len); | |
606 | 607 | the_end: |
607 | -#if defined(DEBUG_PCI) && 0 | |
608 | - printf("pci_data_read: addr=%08x val=%08x len=%d\n", | |
609 | - addr, val, len); | |
608 | +#if 0 | |
609 | + PCI_DPRINTF("pci_data_read: addr=%08x val=%08x len=%d\n", | |
610 | + addr, val, len); | |
610 | 611 | #endif |
611 | 612 | return val; |
612 | 613 | } | ... | ... |