[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/26] mc146818rtc: remove #ifdef DEBUG_CMOS.
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 26/26] mc146818rtc: remove #ifdef DEBUG_CMOS. |
Date: |
Fri, 14 May 2010 16:29:24 +0900 |
remove #ifdef DEBUG_CMOS by using macro.
Signed-off-by: Isaku Yamahata <address@hidden>
Acked-by: Gerd Hoffmann <address@hidden>
---
hw/mc146818rtc.c | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
index cd5e0d7..bf648e5 100644
--- a/hw/mc146818rtc.c
+++ b/hw/mc146818rtc.c
@@ -32,6 +32,12 @@
//#define DEBUG_CMOS
+#ifdef DEBUG_CMOS
+# define CMOS_DPRINTF(format, ...) printf(format, ## __VA_ARGS__)
+#else
+# define CMOS_DPRINTF(format, ...) do { } while (0)
+#endif
+
#define RTC_REINJECT_ON_ACK_COUNT 20
#define RTC_SECONDS 0
@@ -211,10 +217,8 @@ static void cmos_ioport_write(void *opaque, uint32_t addr,
uint32_t data)
if ((addr & 1) == 0) {
s->cmos_index = data & 0x7f;
} else {
-#ifdef DEBUG_CMOS
- printf("cmos: write index=0x%02x val=0x%02x\n",
- s->cmos_index, data);
-#endif
+ CMOS_DPRINTF("cmos: write index=0x%02x val=0x%02x\n",
+ s->cmos_index, data);
switch(s->cmos_index) {
case RTC_SECONDS_ALARM:
case RTC_MINUTES_ALARM:
@@ -485,10 +489,8 @@ static uint32_t cmos_ioport_read(void *opaque, uint32_t
addr)
ret = s->cmos_data[s->cmos_index];
break;
}
-#ifdef DEBUG_CMOS
- printf("cmos: read index=0x%02x val=0x%02x\n",
- s->cmos_index, ret);
-#endif
+ CMOS_DPRINTF("cmos: read index=0x%02x val=0x%02x\n",
+ s->cmos_index, ret);
return ret;
}
}
--
1.6.6.1
- [Qemu-devel] [PATCH 02/26] acpi: split out apm register emulation from acpi.c, (continued)
- [Qemu-devel] [PATCH 02/26] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 05/26] pc: initialize ioapic before use., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 06/26] pc, i440fx: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 13/26] pc: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 08/26] pc: remove a global variable, floppy_controller., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 14/26] pc: split out vga initialization from pc_init1() into pc_vga_init()., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 24/26] acpi_piix4: remove #ifdef DEBUG., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 21/26] pci hotplug: add argument to pci hot plug callback., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 18/26] pc: move rtc declarations from pc.h into a dedicated header file., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 25/26] apm: remove #ifdef DEBUG., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 26/26] mc146818rtc: remove #ifdef DEBUG_CMOS.,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 03/26] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 12/26] pc: split out cpu initialization from pc_init1() into pc_cpus_init()., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 20/26] acpi_piix4: qdevfy., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 23/26] pm_smbus: remove #ifdef DEBUG., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 16/26] pc: split out pci device init from pc_init1() into pc_pci_device_init(), Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 17/26] pc: split out piix specific part from pc.c into pc_piix.c, Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 19/26] rtc: make rtc_xxx accept/return ISADevice instead of RTCState., Isaku Yamahata, 2010/05/14
- [Qemu-devel] [PATCH 22/26] pci hotadd, acpi_piix4: remove global variables, Isaku Yamahata, 2010/05/14
- [Qemu-devel] Re: [PATCH 00/26] split out piix specific part from pc emulator and some clean ups, Blue Swirl, 2010/05/15