* [Qemu-devel] [PATCH 0/3] Cleanup usage of DEBUG name
@ 2010-05-19 18:40 Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 1/3] Rename DEBUG field to TC_DEBUG to avoid name clashes Riccardo Magliocchetti
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Riccardo Magliocchetti @ 2010-05-19 18:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Riccardo Magliocchetti
Some files use DEBUG as a preprocessor conditionals to enable debug
code and i find handy to pass -DDEBUG as extra cflags at configure
time.
Unfortunately this cannot be done if DEBUG name is used for other
purposes.
Riccardo Magliocchetti (3):
Rename DEBUG field to TC_DEBUG to avoid name clashes
Rename DEBUG macro to MSIX_LOG to avoid name clashes
Rename DEBUG define to E1000_DEBUG to avoid name clashes
hw/e1000.c | 4 ++--
hw/msix.c | 4 ++--
hw/tc6393xb.c | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 1/3] Rename DEBUG field to TC_DEBUG to avoid name clashes
2010-05-19 18:40 [Qemu-devel] [PATCH 0/3] Cleanup usage of DEBUG name Riccardo Magliocchetti
@ 2010-05-19 18:40 ` Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 2/3] Rename DEBUG macro to MSIX_LOG " Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 3/3] Rename DEBUG define to E1000_DEBUG " Riccardo Magliocchetti
2 siblings, 0 replies; 4+ messages in thread
From: Riccardo Magliocchetti @ 2010-05-19 18:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Riccardo Magliocchetti
Some files use DEBUG as a preprocessor conditionals to enable debug
code and i find handy to pass -DDEBUG as extra cflags at configure
time.
Unfortunately this cannot be done if DEBUG name is used for other
purposes.
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
---
hw/tc6393xb.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/tc6393xb.c b/hw/tc6393xb.c
index e0c5e5f..31a5fa1 100644
--- a/hw/tc6393xb.c
+++ b/hw/tc6393xb.c
@@ -49,7 +49,7 @@
#define SCR_FER 0xe0 /* b Function Enable */
#define SCR_MCR 0xe4 /* w Mode Control */
#define SCR_CONFIG 0xfc /* b Configuration Control */
-#define SCR_DEBUG 0xff /* b Debug */
+#define SCR_TC_DEBUG 0xff /* b Debug */
#define NAND_CFG_COMMAND 0x04 /* w Command */
#define NAND_CFG_BASE 0x10 /* l Control Base Address */
@@ -103,7 +103,7 @@ struct TC6393xbState {
uint8_t FER;
uint16_t MCR;
uint8_t CONFIG;
- uint8_t DEBUG;
+ uint8_t TC_DEBUG;
} scr;
uint32_t gpio_dir;
uint32_t gpio_level;
@@ -247,7 +247,7 @@ static uint32_t tc6393xb_scr_readb(TC6393xbState *s, target_phys_addr_t addr)
SCR_REG_B(FER);
SCR_REG_W(MCR);
SCR_REG_B(CONFIG);
- SCR_REG_B(DEBUG);
+ SCR_REG_B(TC_DEBUG);
}
fprintf(stderr, "tc6393xb_scr: unhandled read at %08x\n", (uint32_t) addr);
return 0;
@@ -308,7 +308,7 @@ static void tc6393xb_scr_writeb(TC6393xbState *s, target_phys_addr_t addr, uint3
SCR_REG_B(FER);
SCR_REG_W(MCR);
SCR_REG_B(CONFIG);
- SCR_REG_B(DEBUG);
+ SCR_REG_B(TC_DEBUG);
}
fprintf(stderr, "tc6393xb_scr: unhandled write at %08x: %02x\n",
(uint32_t) addr, value & 0xff);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 2/3] Rename DEBUG macro to MSIX_LOG to avoid name clashes
2010-05-19 18:40 [Qemu-devel] [PATCH 0/3] Cleanup usage of DEBUG name Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 1/3] Rename DEBUG field to TC_DEBUG to avoid name clashes Riccardo Magliocchetti
@ 2010-05-19 18:40 ` Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 3/3] Rename DEBUG define to E1000_DEBUG " Riccardo Magliocchetti
2 siblings, 0 replies; 4+ messages in thread
From: Riccardo Magliocchetti @ 2010-05-19 18:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Riccardo Magliocchetti, Michael S . Tsirkin
Some files use DEBUG as a preprocessor conditionals to enable debug
code and i find handy to pass -DDEBUG as extra cflags at configure
time.
Unfortunately this cannot be done if DEBUG name is used for other
purposes.
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
---
hw/msix.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/msix.c b/hw/msix.c
index 2ca0900..36ef098 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -51,12 +51,12 @@
#ifdef MSIX_DEBUG
-#define DEBUG(fmt, ...) \
+#define MSIX_LOG(fmt, ...) \
do { \
fprintf(stderr, "%s: " fmt, __func__ , __VA_ARGS__); \
} while (0)
#else
-#define DEBUG(fmt, ...) do { } while(0)
+#define MSIX_LOG(fmt, ...) do { } while(0)
#endif
/* Flag for interrupt controller to declare MSI-X support */
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH 3/3] Rename DEBUG define to E1000_DEBUG to avoid name clashes
2010-05-19 18:40 [Qemu-devel] [PATCH 0/3] Cleanup usage of DEBUG name Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 1/3] Rename DEBUG field to TC_DEBUG to avoid name clashes Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 2/3] Rename DEBUG macro to MSIX_LOG " Riccardo Magliocchetti
@ 2010-05-19 18:40 ` Riccardo Magliocchetti
2 siblings, 0 replies; 4+ messages in thread
From: Riccardo Magliocchetti @ 2010-05-19 18:40 UTC (permalink / raw)
To: qemu-devel; +Cc: Riccardo Magliocchetti
Some files use DEBUG as a preprocessor conditionals to enable debug
code and i find handy to pass -DDEBUG as extra cflags at configure
time.
Unfortunately this cannot be done if DEBUG name is used for other
purposes.
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
---
hw/e1000.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/e1000.c b/hw/e1000.c
index 96d045d..0da65f9 100644
--- a/hw/e1000.c
+++ b/hw/e1000.c
@@ -33,9 +33,9 @@
#include "e1000_hw.h"
-#define DEBUG
+#define E1000_DEBUG
-#ifdef DEBUG
+#ifdef E1000_DEBUG
enum {
DEBUG_GENERAL, DEBUG_IO, DEBUG_MMIO, DEBUG_INTERRUPT,
DEBUG_RX, DEBUG_TX, DEBUG_MDIC, DEBUG_EEPROM,
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-19 18:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-19 18:40 [Qemu-devel] [PATCH 0/3] Cleanup usage of DEBUG name Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 1/3] Rename DEBUG field to TC_DEBUG to avoid name clashes Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 2/3] Rename DEBUG macro to MSIX_LOG " Riccardo Magliocchetti
2010-05-19 18:40 ` [Qemu-devel] [PATCH 3/3] Rename DEBUG define to E1000_DEBUG " Riccardo Magliocchetti
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).