netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 4/6] mac80211: clean up debugging
       [not found]   ` <1340370882-9258-5-git-send-email-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
@ 2012-06-22 14:37     ` Joe Perches
  2012-06-22 14:43       ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2012-06-22 14:37 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, Johannes Berg, netdev

On Fri, 2012-06-22 at 15:14 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> There are a few things that make the debugging
> in mac80211 painful:
>  * pr_debug makes it require *both* Kconfig and
>    dynamic configuration -- move to pr_info

pr_info can clutter the log.

>  * the macros still need trailing newlines

That's not a bad thing.


> @@ -317,7 +318,7 @@ ieee80211_agg_splice_packets(struct ieee80211_sub_if_data *sdata,
>  	ieee80211_stop_queue_agg(sdata, tid);
>  
>  	if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
> -			  " from the pending queue\n", tid))
> +			  " from the pending queue", tid))


defective.

Don't remove newlines in single modules.

Using a single style _with_ a newline limits defects and
limits the likely misuse in other styles.


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 4/6] mac80211: clean up debugging
  2012-06-22 14:37     ` [PATCH 4/6] mac80211: clean up debugging Joe Perches
@ 2012-06-22 14:43       ` Johannes Berg
  2012-06-22 14:49         ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2012-06-22 14:43 UTC (permalink / raw)
  To: Joe Perches; +Cc: linux-wireless, netdev

On Fri, 2012-06-22 at 07:37 -0700, Joe Perches wrote:
> On Fri, 2012-06-22 at 15:14 +0200, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > There are a few things that make the debugging
> > in mac80211 painful:
> >  * pr_debug makes it require *both* Kconfig and
> >    dynamic configuration -- move to pr_info
> 
> pr_info can clutter the log.

Yes, please. We want this information printed unless it's disabled :-)

> >  * the macros still need trailing newlines
> 
> That's not a bad thing.

People are clearly forgetting them all the time. So I don't see any
reason to not add them in the macros if we're going to have macros
anyway.

> > @@ -317,7 +318,7 @@ ieee80211_agg_splice_packets(struct ieee80211_sub_if_data *sdata,
> >  	ieee80211_stop_queue_agg(sdata, tid);
> >  
> >  	if (WARN(!tid_tx, "TID %d gone but expected when splicing aggregates"
> > -			  " from the pending queue\n", tid))
> > +			  " from the pending queue", tid))
> 
> 
> defective.
> 
> Don't remove newlines in single modules.

Hm, I was under the impression WARN() didn't require a newline. Looks
like either that changed, or I was wrong -- will change this back.

> Using a single style _with_ a newline limits defects and
> limits the likely misuse in other styles.

I'd rather have double newlines once a while than missing ones. I've
seen a lot of bugs with missing newlines, which is rather annoying.

johannes

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

* Re: [PATCH 4/6] mac80211: clean up debugging
  2012-06-22 14:43       ` Johannes Berg
@ 2012-06-22 14:49         ` Joe Perches
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2012-06-22 14:49 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, netdev

On Fri, 2012-06-22 at 16:43 +0200, Johannes Berg wrote:
> > Using a single style _with_ a newline limits defects and
> > limits the likely misuse in other styles.
> 
> I'd rather have double newlines once a while than missing ones. I've
> seen a lot of bugs with missing newlines, which is rather annoying.

Yeah, I have too.

It's because people add macros that add terminating
newlines and there's no style consistency.

I think you should _not_ add more macros that promote
this inconsistency.

usb's uses of err/warn/info/dbg are going away.

These should too.

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

end of thread, other threads:[~2012-06-22 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1340370882-9258-1-git-send-email-johannes@sipsolutions.net>
     [not found] ` <1340370882-9258-5-git-send-email-johannes@sipsolutions.net>
     [not found]   ` <1340370882-9258-5-git-send-email-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2012-06-22 14:37     ` [PATCH 4/6] mac80211: clean up debugging Joe Perches
2012-06-22 14:43       ` Johannes Berg
2012-06-22 14:49         ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).