Skip to contentSkip to conversation

Remove naked #define DEBUG to allow -DDEBUG builds

PATCH Applied [email protected] 2 participants 4 messages Jun 14, 2010

lore
Share & tools
lore
#0 lore raw

cover Remove naked #define DEBUG to allow -DDEBUG builds

From: Jes Sorensen <[email protected]>

Hi,

To address https://sourceforge.net/tracker/?func=detail&aid=1945129&group_id=180599&atid=893831
this patch removes two cases where drivers would define 'DEBUG' naked
instead of using E1000_DEBUG or similar. Such usage of DEBUG conflicts
with the possibility to build QEMU with --extra-cflags=-DDEBUG

Jes Sorensen (2):
Remove unused DEBUG defines from hw/msix.c Change #define DEBUG to #define E1000_DEBUG in hw/e1000.c

 hw/e1000.c |    4 ++--
 hw/msix.c  |    9 ---------
 2 files changed, 2 insertions(+), 11 deletions(-)
#1 lore raw

PATCH 1/2 Remove unused DEBUG defines from hw/msix.c

From: Jes Sorensen <[email protected]>

Remove unused DEBUG defines from hw/msix.c to avoid having anything define the word DEBUG without any additions such as MSIX_DEBUG.

---
 hw/msix.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
hw/msix.c +0 -9
index 1613bb4..d99403a 100644
@@ -42,15 +42,6 @@
 #define MSIX_MAX_ENTRIES 32
 
 
-#ifdef MSIX_DEBUG
-#define DEBUG(fmt, ...)                                       \
-    do {                                                      \
-      fprintf(stderr, "%s: " fmt, __func__ , __VA_ARGS__);    \
-    } while (0)
-#else
-#define DEBUG(fmt, ...) do { } while(0)
-#endif
-
 /* Flag for interrupt controller to declare MSI-X support */
 int msix_supported;
 
Signature · 1 line
1.6.6.1
#2 lore raw

PATCH 2/2 Change #define DEBUG to #define E1000_DEBUG in hw/e1000.c

From: Jes Sorensen <[email protected]>

Change #define DEBUG to #define E1000_DEBUG in hw/e1000.c to make it possible to build QEMU with -DDEBUG

---
 hw/e1000.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/e1000.c +2 -2
index 96d045d..0da65f9 100644
@@ -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,
Signature · 1 line
1.6.6.1
#3 lore raw

Re: [Qemu-devel] [PATCH 1/2] Remove unused DEBUG defines from hw/msix.c

In reply to [email protected]
Quoted 7 lines · On 06/14/2010 10:05 AM, [email protected] wrote:

From: Jes Sorensen<[email protected]>

Remove unused DEBUG defines from hw/msix.c to avoid having anything define the word DEBUG without any additions such as MSIX_DEBUG.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 25 lines
---
  hw/msix.c |    9 ---------
  1 files changed, 0 insertions(+), 9 deletions(-)
hw/msix.c +0 -9
index 1613bb4..d99403a 100644
@@ -42,15 +42,6 @@
  #define MSIX_MAX_ENTRIES 32
 
 
-#ifdef MSIX_DEBUG
-#define DEBUG(fmt, ...)                                       \
-    do {                                                      \
-      fprintf(stderr, "%s: " fmt, __func__ , __VA_ARGS__);    \
-    } while (0)
-#else
-#define DEBUG(fmt, ...) do { } while(0)
-#endif
-
  /* Flag for interrupt controller to declare MSI-X support */
  int msix_supported;