Skip to contentSkip to conversation

compat-wireless: fix debugging in iwlwifi

PATCH In review Johannes Berg 3 participants 8 messages Jul 3, 2012 – Jul 9, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compat-wireless: fix debugging in iwlwifi

From: Johannes Berg <[email protected]>

As compat includes linux/device.h well before iwlwifi, the definitions from there are used without DEBUG, but iwlwifi defines DEBUG to get debug output. Use dev_printk instead of dev_dbg to get debugging back.

---
 patches/57-iwlwifi-debug-fix.patch |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 patches/57-iwlwifi-debug-fix.patch
patches/57-iwlwifi-debug-fix.patch new file +19 -0
new file mode 100644
index 0000000..4b2dfa9
@@ -0,0 +1,19 @@
+Due to compat including linux/device.h before we do,
+we don't get a chance to #define DEBUG to get our
+debugging prints. This patch replaces dev_dbg with
+dev_printk to make them show up again.
+
+--- a/drivers/net/wireless/iwlwifi/iwl-debug.c
++++ b/drivers/net/wireless/iwlwifi/iwl-debug.c
+@@ -138,8 +138,9 @@ void __iwl_dbg(struct device *dev,
+ 
+ 		va_copy(args2, args);
+ 		vaf.va = &args2;
+-		dev_dbg(dev, "%c %s %pV", in_interrupt() ? 'I' : 'U',
+-			function, &vaf);
++		dev_printk(KERN_DEBUG, dev, "%c %s %pV",
++			   in_interrupt() ? 'I' : 'U',
++			   function, &vaf);
+ 		va_end(args2);
+ 	}
+ #endif
Signature · 1 line
1.7.10
#1 lore raw
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

As compat includes linux/device.h well before iwlwifi, the definitions from there are used without DEBUG, but iwlwifi defines DEBUG to get debug output. Use dev_printk instead of dev_dbg to get debugging back.

Applied and pushed, thanks!

Luis

#2 lore raw
Quoted 11 lines · Luis R. Rodriguez
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

As compat includes linux/device.h well before iwlwifi, the definitions from there are used without DEBUG, but iwlwifi defines DEBUG to get debug output. Use dev_printk instead of dev_dbg to get debugging back.

Applied and pushed, thanks!

On today's linux-next.git the dev_dbg() changed to dev_err(), I've updated the patch to reflect this.

mcgrof@tux ~/devel/compat-wireless (git::master)$ git diff

(quoted diff) +0 -0

b/patches/57-iwlwifi-debug-fix.patch
index 4b2dfa9..1bfc88f 100644

patches/57-iwlwifi-debug-fix.patch +1 -1
@@ -9,7 +9,7 @@ dev_printk to make them show up again.
 
                va_copy(args2, args);
                vaf.va = &args2;
--              dev_dbg(dev, "%c %s %pV", in_interrupt() ? 'I' : 'U',
+-              dev_err(dev, "%c %s %pV", in_interrupt() ? 'I' : 'U',
 -                      function, &vaf);
 +              dev_printk(KERN_DEBUG, dev, "%c %s %pV",
 +                         in_interrupt() ? 'I' : 'U'

Luis

#3 lore raw
Quoted 9 lines · Luis R. Rodriguez
Quoted 8 lines · Luis R. Rodriguez
Quoted 7 lines · Johannes Berg

From: Johannes Berg <[email protected]>

As compat includes linux/device.h well before iwlwifi, the definitions from there are used without DEBUG, but iwlwifi defines DEBUG to get debug output. Use dev_printk instead of dev_dbg to get debugging back.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Applied and pushed, thanks!

On today's linux-next.git the dev_dbg() changed to dev_err(), I've updated the patch to reflect this.

Huh, sorry. Please drop this for now -- the patch to change it *from* dev_err *to* dev_dbg is only in my iwlwifi-next tree now.

johannes

#4 lore raw
Quoted 12 lines · Johannes Berg
Quoted 11 lines · Luis R. Rodriguez
Quoted 10 lines · Luis R. Rodriguez
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

As compat includes linux/device.h well before iwlwifi, the definitions from there are used without DEBUG, but iwlwifi defines DEBUG to get debug output. Use dev_printk instead of dev_dbg to get debugging back.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applied and pushed, thanks!

On today's linux-next.git the dev_dbg() changed to dev_err(), I've updated the patch to reflect this.

Huh, sorry. Please drop this for now -- the patch to change it *from* dev_err *to* dev_dbg is only in my iwlwifi-next tree now.

And besides, the concept is wrong.

There's no reason to drop dynamic_debug support by forcing output to KERN_DEBUG.

#7 lore raw
In reply to Johannes Berg
Quoted 12 lines · Johannes Berg
Quoted 11 lines · Luis R. Rodriguez
Quoted 10 lines · Luis R. Rodriguez
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

As compat includes linux/device.h well before iwlwifi, the definitions from there are used without DEBUG, but iwlwifi defines DEBUG to get debug output. Use dev_printk instead of dev_dbg to get debugging back.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Applied and pushed, thanks!

On today's linux-next.git the dev_dbg() changed to dev_err(), I've updated the patch to reflect this.

Huh, sorry. Please drop this for now -- the patch to change it *from* dev_err *to* dev_dbg is only in my iwlwifi-next tree now.

Dropped patches/57-iwlwifi-debug-fix.patch

Luis

#5 lore raw
In reply to Joe Perches
Quoted 18 lines · Joe Perches
Quoted 17 lines · Johannes Berg
Quoted 15 lines · Luis R. Rodriguez
Quoted 11 lines · Luis R. Rodriguez
Quoted 8 lines · Johannes Berg

From: Johannes Berg <[email protected]>

As compat includes linux/device.h well before iwlwifi, the definitions from there are used without DEBUG, but iwlwifi defines DEBUG to get debug output. Use dev_printk instead of dev_dbg to get debugging back.

Applied and pushed, thanks!

On today's linux-next.git the dev_dbg() changed to dev_err(), I've updated the patch to reflect this.

Quoted 7 lines
Quoted 2 lines

Huh, sorry. Please drop this for now -- the patch to change it *from* dev_err *to* dev_dbg is only in my iwlwifi-next tree now.

And besides, the concept is wrong.

There's no reason to drop dynamic_debug support by forcing output to KERN_DEBUG.

Well, the thing is, "#define DEBUG" doesn't work in compat-wireless ... We add it to the Makefile though I guess

johannes

#6 lore raw
Quoted 22 lines · Johannes Berg
Quoted 21 lines · Joe Perches
Quoted 19 lines · Johannes Berg
Quoted 9 lines · Luis R. Rodriguez
Quoted 8 lines · Luis R. Rodriguez
Quoted 7 lines · Johannes Berg

From: Johannes Berg <[email protected]>

As compat includes linux/device.h well before iwlwifi, the definitions from there are used without DEBUG, but iwlwifi defines DEBUG to get debug output. Use dev_printk instead of dev_dbg to get debugging back.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Applied and pushed, thanks!

On today's linux-next.git the dev_dbg() changed to dev_err(), I've updated the patch to reflect this.

Huh, sorry. Please drop this for now -- the patch to change it *from* dev_err *to* dev_dbg is only in my iwlwifi-next tree now.

Quoted 7 lines
Quoted 4 lines

And besides, the concept is wrong.

There's no reason to drop dynamic_debug support by forcing output to KERN_DEBUG.

Well, the thing is, "#define DEBUG" doesn't work in compat-wireless ... We add it to the Makefile though I guess

What if we add a hunk to iwlwifi to undef DEBUG and redefine it ? Sort of similar problem as with pr_fmt no? I've merged this patch now.

Luis