[PATCH libdrm 2/7] nouveau: remove always-true #ifdef guards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



`DEBUG` has always been defined since 292da616fe1f936ca78a3 "nouveau:
pull in major libdrm rewrite" in 2011

Signed-off-by: Eric Engestrom <eric.engestrom@xxxxxxxxxx>
---
 nouveau/Makefile.am | 3 +--
 nouveau/nouveau.c   | 4 ----
 nouveau/private.h   | 5 -----
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/nouveau/Makefile.am b/nouveau/Makefile.am
index 344a84454e420044afb5..60ebe243d4236e6aa814 100644
--- a/nouveau/Makefile.am
+++ b/nouveau/Makefile.am
@@ -4,8 +4,7 @@ AM_CFLAGS = \
 	$(WARN_CFLAGS) \
 	-I$(top_srcdir) \
 	$(PTHREADSTUBS_CFLAGS) \
-	-I$(top_srcdir)/include/drm \
-	-DDEBUG
+	-I$(top_srcdir)/include/drm
 
 libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la
 libdrm_nouveau_ladir = $(libdir)
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index e113a8fe780757a096b2..e68de16fe42c1953e9c0 100644
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
@@ -50,7 +50,6 @@
 #include "nvif/ioctl.h"
 #include "nvif/unpack.h"
 
-#ifdef DEBUG
 drm_private uint32_t nouveau_debug = 0;
 
 static void
@@ -62,7 +61,6 @@ debug_init(char *args)
 			nouveau_debug = n;
 	}
 }
-#endif
 
 static int
 nouveau_object_ioctl(struct nouveau_object *obj, void *data, uint32_t size)
@@ -331,9 +329,7 @@ nouveau_drm_new(int fd, struct nouveau_drm **pdrm)
 	struct nouveau_drm *drm;
 	drmVersionPtr ver;
 
-#ifdef DEBUG
 	debug_init(getenv("NOUVEAU_LIBDRM_DEBUG"));
-#endif
 
 	if (!(drm = calloc(1, sizeof(*drm))))
 		return -ENOMEM;
diff --git a/nouveau/private.h b/nouveau/private.h
index 83060f965244fac3f087..8eca0a067195d7c5c54c 100644
--- a/nouveau/private.h
+++ b/nouveau/private.h
@@ -9,17 +9,12 @@
 
 #include "nouveau.h"
 
-#ifdef DEBUG
 drm_private uint32_t nouveau_debug;
 #define dbg_on(lvl) (nouveau_debug & (1 << lvl))
 #define dbg(lvl, fmt, args...) do {                                            \
 	if (dbg_on((lvl)))                                                     \
 		fprintf(stderr, "nouveau: "fmt, ##args);                       \
 } while(0)
-#else
-#define dbg_on(lvl) (0)
-#define dbg(lvl, fmt, args...)
-#endif
 #define err(fmt, args...) fprintf(stderr, "nouveau: "fmt, ##args)
 
 struct nouveau_client_kref {
-- 
Cheers,
  Eric

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux