Skip to contentSkip to conversation

apparent typo in ixgb.h, "_DEBUG_DRIVER_" looks wrong

PATCH In review Robert P. J. Day 3 participants 4 messages Oct 10, 2006 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 apparent typo in ixgb.h, "_DEBUG_DRIVER_" looks wrong

I'm *guessing* that "_DEBUG_DRIVER_" should really be "DEBUG_DRIVER" here, since there is no other occurrence of the former anywhere in the source tree.

---

 drivers/net/ixgb/ixgb.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgb/ixgb.h +1 -1
index 50ffe90..b2dd9b0 100644
@@ -77,7 +77,7 @@ #include "ixgb_hw.h"
 #include "ixgb_ee.h"
 #include "ixgb_ids.h"
 
-#ifdef _DEBUG_DRIVER_
+#ifdef DEBUG_DRIVER
 #define IXGB_DBG(args...) printk(KERN_DEBUG "ixgb: " args)
 #else
 #define IXGB_DBG(args...)
#1 lore raw
Quoted 3 lines · Robert P. J. Day

I'm *guessing* that "_DEBUG_DRIVER_" should really be "DEBUG_DRIVER" here, since there is no other occurrence of the former anywhere in the source tree.

Since it's debugging guard, underscored or not... doesn't matter. Convert to pr_debug or dev_dbg of you want to deal with it.

Quoted 11 lines
drivers/net/ixgb/ixgb.h +1 -1
@@ -77,7 +77,7 @@ #include "ixgb_hw.h"
 #include "ixgb_ee.h"
 #include "ixgb_ids.h"
 
-#ifdef _DEBUG_DRIVER_
+#ifdef DEBUG_DRIVER
 #define IXGB_DBG(args...) printk(KERN_DEBUG "ixgb: " args)
 #else
 #define IXGB_DBG(args...)
#2 lore raw
Quoted 14 lines · Alexey Dobriyan
Quoted 3 lines · Robert P. J. Day

I'm *guessing* that "_DEBUG_DRIVER_" should really be "DEBUG_DRIVER" here, since there is no other occurrence of the former anywhere in the source tree.

Since it's debugging guard, underscored or not... doesn't matter. Convert to pr_debug or dev_dbg of you want to deal with it.

Quoted 6 lines
drivers/net/ixgb/ixgb.h +0 -0
@@ -77,7 +77,7 @@ #include "ixgb_hw.h"
 #include "ixgb_ee.h"
 #include "ixgb_ids.h"
 
Quoted 5 lines

drivers/net/ixgb/ixgb.h #include "ixgb_hw.h" · line 83

Quoted 5 lines
drivers/net/ixgb/ixgb.h +1 -1
-#ifdef _DEBUG_DRIVER_
+#ifdef DEBUG_DRIVER
 #define IXGB_DBG(args...) printk(KERN_DEBUG "ixgb: " args)
 #else
 #define IXGB_DBG(args...)

but what you're suggesting is not equivalent. i submitted that patch to fix what *seems* to be an obvious, innocuous typo, to bring that one header file into sync with the rest of the source tree, nothing more.

if all debugging should now use either of pr_debug() or dev_dbg(), that's fine but i notice that both of those macros will be defined only if "DEBUG" is defined, not "DEBUG_DRIVER". so making the change you suggest would *not* be a trivial change.

what's the current standard for debugging directives in the kernel?

rday

#3 lore raw
Quoted 27 lines · Robert P. J. Day
Quoted 14 lines · Alexey Dobriyan
Quoted 3 lines · Robert P. J. Day

I'm *guessing* that "_DEBUG_DRIVER_" should really be "DEBUG_DRIVER" here, since there is no other occurrence of the former anywhere in the source tree.

Since it's debugging guard, underscored or not... doesn't matter. Convert to pr_debug or dev_dbg of you want to deal with it.

Quoted 6 lines
drivers/net/ixgb/ixgb.h +0 -0
@@ -77,7 +77,7 @@ #include "ixgb_hw.h"
 #include "ixgb_ee.h"
 #include "ixgb_ids.h"
 
Quoted 5 lines

drivers/net/ixgb/ixgb.h #include "ixgb_hw.h" · line 83

Quoted 5 lines
drivers/net/ixgb/ixgb.h +1 -1
-#ifdef _DEBUG_DRIVER_
+#ifdef DEBUG_DRIVER
 #define IXGB_DBG(args...) printk(KERN_DEBUG "ixgb: " args)
 #else
 #define IXGB_DBG(args...)

but what you're suggesting is not equivalent. i submitted that patch to fix what *seems* to be an obvious, innocuous typo, to bring that one header file into sync with the rest of the source tree, nothing more.

Quoted 6 lines

if all debugging should now use either of pr_debug() or dev_dbg(), that's fine but i notice that both of those macros will be defined only if "DEBUG" is defined, not "DEBUG_DRIVER". so making the change you suggest would *not* be a trivial change.

what's the current standard for debugging directives in the kernel?

to use pr_debug or dev_dbg.
Yes it'll mean a slight change for this driver, but just do it.