All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] compat-wireless: fix debugging in iwlwifi
@ 2012-07-03 13:28 Johannes Berg
  2012-07-03 15:47 ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2012-07-03 13:28 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

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.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 patches/57-iwlwifi-debug-fix.patch |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 patches/57-iwlwifi-debug-fix.patch

diff --git a/patches/57-iwlwifi-debug-fix.patch b/patches/57-iwlwifi-debug-fix.patch
new file mode 100644
index 0000000..4b2dfa9
--- /dev/null
+++ b/patches/57-iwlwifi-debug-fix.patch
@@ -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
-- 
1.7.10




^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat-wireless: fix debugging in iwlwifi
  2012-07-03 13:28 [PATCH] compat-wireless: fix debugging in iwlwifi Johannes Berg
@ 2012-07-03 15:47 ` Luis R. Rodriguez
  2012-07-03 16:16   ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2012-07-03 15:47 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Tue, Jul 3, 2012 at 6:28 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> 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.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Applied and pushed, thanks!

  Luis

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat-wireless: fix debugging in iwlwifi
  2012-07-03 15:47 ` Luis R. Rodriguez
@ 2012-07-03 16:16   ` Luis R. Rodriguez
  2012-07-03 16:21     ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Luis R. Rodriguez @ 2012-07-03 16:16 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Tue, Jul 3, 2012 at 8:47 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Tue, Jul 3, 2012 at 6:28 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> From: Johannes Berg <johannes.berg@intel.com>
>>
>> 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.
>>
>> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>
> 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
diff --git a/patches/57-iwlwifi-debug-fix.patch
b/patches/57-iwlwifi-debug-fix.patch
index 4b2dfa9..1bfc88f 100644
--- a/patches/57-iwlwifi-debug-fix.patch
+++ b/patches/57-iwlwifi-debug-fix.patch
@@ -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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat-wireless: fix debugging in iwlwifi
  2012-07-03 16:16   ` Luis R. Rodriguez
@ 2012-07-03 16:21     ` Johannes Berg
  2012-07-03 16:28       ` Joe Perches
  2012-07-03 16:30       ` Luis R. Rodriguez
  0 siblings, 2 replies; 8+ messages in thread
From: Johannes Berg @ 2012-07-03 16:21 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless

On Tue, 2012-07-03 at 09:16 -0700, Luis R. Rodriguez wrote:
> On Tue, Jul 3, 2012 at 8:47 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> > On Tue, Jul 3, 2012 at 6:28 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> >> From: Johannes Berg <johannes.berg@intel.com>
> >>
> >> 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.
> >>
> >> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> >
> > 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat-wireless: fix debugging in iwlwifi
  2012-07-03 16:21     ` Johannes Berg
@ 2012-07-03 16:28       ` Joe Perches
  2012-07-03 16:47         ` Johannes Berg
  2012-07-03 16:30       ` Luis R. Rodriguez
  1 sibling, 1 reply; 8+ messages in thread
From: Joe Perches @ 2012-07-03 16:28 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Luis R. Rodriguez, linux-wireless

On Tue, 2012-07-03 at 18:21 +0200, Johannes Berg wrote:
> On Tue, 2012-07-03 at 09:16 -0700, Luis R. Rodriguez wrote:
> > On Tue, Jul 3, 2012 at 8:47 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> > > On Tue, Jul 3, 2012 at 6:28 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > >> From: Johannes Berg <johannes.berg@intel.com>
> > >>
> > >> 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.
> > >>
> > >> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> > >
> > > 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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat-wireless: fix debugging in iwlwifi
  2012-07-03 16:21     ` Johannes Berg
  2012-07-03 16:28       ` Joe Perches
@ 2012-07-03 16:30       ` Luis R. Rodriguez
  1 sibling, 0 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2012-07-03 16:30 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

On Tue, Jul 3, 2012 at 9:21 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2012-07-03 at 09:16 -0700, Luis R. Rodriguez wrote:
>> On Tue, Jul 3, 2012 at 8:47 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
>> > On Tue, Jul 3, 2012 at 6:28 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> >> From: Johannes Berg <johannes.berg@intel.com>
>> >>
>> >> 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.
>> >>
>> >> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>> >
>> > 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat-wireless: fix debugging in iwlwifi
  2012-07-03 16:28       ` Joe Perches
@ 2012-07-03 16:47         ` Johannes Berg
  2012-07-09 22:27           ` Luis R. Rodriguez
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2012-07-03 16:47 UTC (permalink / raw)
  To: Joe Perches; +Cc: Luis R. Rodriguez, linux-wireless

On Tue, 2012-07-03 at 09:28 -0700, Joe Perches wrote:
> On Tue, 2012-07-03 at 18:21 +0200, Johannes Berg wrote:
> > On Tue, 2012-07-03 at 09:16 -0700, Luis R. Rodriguez wrote:
> > > On Tue, Jul 3, 2012 at 8:47 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> > > > On Tue, Jul 3, 2012 at 6:28 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > > >> From: Johannes Berg <johannes.berg@intel.com>
> > > >>
> > > >> 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.
> > > >>
> > > >> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> > > >
> > > > 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.

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

johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] compat-wireless: fix debugging in iwlwifi
  2012-07-03 16:47         ` Johannes Berg
@ 2012-07-09 22:27           ` Luis R. Rodriguez
  0 siblings, 0 replies; 8+ messages in thread
From: Luis R. Rodriguez @ 2012-07-09 22:27 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Joe Perches, linux-wireless

On Tue, Jul 3, 2012 at 9:47 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2012-07-03 at 09:28 -0700, Joe Perches wrote:
>> On Tue, 2012-07-03 at 18:21 +0200, Johannes Berg wrote:
>> > On Tue, 2012-07-03 at 09:16 -0700, Luis R. Rodriguez wrote:
>> > > On Tue, Jul 3, 2012 at 8:47 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
>> > > > On Tue, Jul 3, 2012 at 6:28 AM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> > > >> From: Johannes Berg <johannes.berg@intel.com>
>> > > >>
>> > > >> 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.
>> > > >>
>> > > >> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
>> > > >
>> > > > 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.
>
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-09 22:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-03 13:28 [PATCH] compat-wireless: fix debugging in iwlwifi Johannes Berg
2012-07-03 15:47 ` Luis R. Rodriguez
2012-07-03 16:16   ` Luis R. Rodriguez
2012-07-03 16:21     ` Johannes Berg
2012-07-03 16:28       ` Joe Perches
2012-07-03 16:47         ` Johannes Berg
2012-07-09 22:27           ` Luis R. Rodriguez
2012-07-03 16:30       ` Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.