diff mbox

[libdrm,8/9] drm: replace HASH_DEBUG with DEBUG

Message ID 1427061825-27470-9-git-send-email-emil.l.velikov@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Emil Velikov March 22, 2015, 10:03 p.m. UTC
... and remove the useless SL_DEBUG and RANDOM_DEBUG

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 xf86drmHash.c   | 5 ++---
 xf86drmRandom.c | 1 -
 xf86drmSL.c     | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

Comments

Jan Vesely March 24, 2015, 12:01 a.m. UTC | #1
On Sun, 2015-03-22 at 22:03 +0000, Emil Velikov wrote:
> ... and remove the useless SL_DEBUG and RANDOM_DEBUG
> 
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  xf86drmHash.c   | 5 ++---
>  xf86drmRandom.c | 1 -
>  xf86drmSL.c     | 1 -
>  3 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/xf86drmHash.c b/xf86drmHash.c
> index 82512a8..12baa62 100644
> --- a/xf86drmHash.c
> +++ b/xf86drmHash.c
> @@ -74,7 +74,6 @@
>  #include "xf86drm.h"
>  
>  #define HASH_MAGIC 0xdeadbeef
> -#define HASH_DEBUG 0
>  #define HASH_SIZE  512		/* Good for about 100 entries */
>  				/* If you change this value, you probably
>                                     have to change the HashHash hashing
> @@ -119,7 +118,7 @@ static unsigned long HashHash(unsigned long key)
>      }
>  
>      hash %= HASH_SIZE;
> -#if HASH_DEBUG
> +#if DEBUG
>      printf( "Hash(%d) = %d\n", key, hash);
>  #endif
>      return hash;
> @@ -222,7 +221,7 @@ int drmHashInsert(void *t, unsigned long key, void *value)
>      bucket->value        = value;
>      bucket->next         = table->buckets[hash];
>      table->buckets[hash] = bucket;
> -#if HASH_DEBUG
> +#if DEBUG
>      printf("Inserted %d at %d/%p\n", key, hash, bucket);
>  #endif
>      return 0;			/* Added to table */
> diff --git a/xf86drmRandom.c b/xf86drmRandom.c
> index 39f3c52..2177d27 100644
> --- a/xf86drmRandom.c
> +++ b/xf86drmRandom.c
> @@ -77,7 +77,6 @@
>  #include "xf86drm.h"
>  
>  #define RANDOM_MAGIC 0xfeedbeef
> -#define RANDOM_DEBUG 0
>  
>  typedef struct RandomState {
>      unsigned long magic;
> diff --git a/xf86drmSL.c b/xf86drmSL.c
> index acddb54..9bbf8fb 100644
> --- a/xf86drmSL.c
> +++ b/xf86drmSL.c
> @@ -53,7 +53,6 @@
>  #define SL_ENTRY_MAGIC 0x00fab1edLU
>  #define SL_FREED_MAGIC 0xdecea5edLU
>  #define SL_MAX_LEVEL   16
> -#define SL_DEBUG       0
>  #define SL_RANDOM_SEED 0xc01055a1LU
>  
>  #if SL_MAIN

Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
diff mbox

Patch

diff --git a/xf86drmHash.c b/xf86drmHash.c
index 82512a8..12baa62 100644
--- a/xf86drmHash.c
+++ b/xf86drmHash.c
@@ -74,7 +74,6 @@ 
 #include "xf86drm.h"
 
 #define HASH_MAGIC 0xdeadbeef
-#define HASH_DEBUG 0
 #define HASH_SIZE  512		/* Good for about 100 entries */
 				/* If you change this value, you probably
                                    have to change the HashHash hashing
@@ -119,7 +118,7 @@  static unsigned long HashHash(unsigned long key)
     }
 
     hash %= HASH_SIZE;
-#if HASH_DEBUG
+#if DEBUG
     printf( "Hash(%d) = %d\n", key, hash);
 #endif
     return hash;
@@ -222,7 +221,7 @@  int drmHashInsert(void *t, unsigned long key, void *value)
     bucket->value        = value;
     bucket->next         = table->buckets[hash];
     table->buckets[hash] = bucket;
-#if HASH_DEBUG
+#if DEBUG
     printf("Inserted %d at %d/%p\n", key, hash, bucket);
 #endif
     return 0;			/* Added to table */
diff --git a/xf86drmRandom.c b/xf86drmRandom.c
index 39f3c52..2177d27 100644
--- a/xf86drmRandom.c
+++ b/xf86drmRandom.c
@@ -77,7 +77,6 @@ 
 #include "xf86drm.h"
 
 #define RANDOM_MAGIC 0xfeedbeef
-#define RANDOM_DEBUG 0
 
 typedef struct RandomState {
     unsigned long magic;
diff --git a/xf86drmSL.c b/xf86drmSL.c
index acddb54..9bbf8fb 100644
--- a/xf86drmSL.c
+++ b/xf86drmSL.c
@@ -53,7 +53,6 @@ 
 #define SL_ENTRY_MAGIC 0x00fab1edLU
 #define SL_FREED_MAGIC 0xdecea5edLU
 #define SL_MAX_LEVEL   16
-#define SL_DEBUG       0
 #define SL_RANDOM_SEED 0xc01055a1LU
 
 #if SL_MAIN