Re: [PATCH 4/6] mac80211: clean up debugging

3 messages, 3 authors, 2012-06-22 · open the first message on its own page

Re: [PATCH 4/6] mac80211: clean up debugging

From: Joe Perches <hidden>
Date: 2012-06-22 14:37:08

On Fri, 2012-06-22 at 15:14 +0200, Johannes Berg wrote:
From: Johannes Berg <redacted>

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.

quoted hunk
@@ -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

Re: [PATCH 4/6] mac80211: clean up debugging

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2012-06-22 14:43:25

On Fri, 2012-06-22 at 07:37 -0700, Joe Perches wrote:
On Fri, 2012-06-22 at 15:14 +0200, Johannes Berg wrote:
quoted
From: Johannes Berg <redacted>

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 :-)
quoted
 * 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.
quoted
@@ -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

Re: [PATCH 4/6] mac80211: clean up debugging

From: Joe Perches <joe@perches.com>
Date: 2012-06-22 14:49:09

On Fri, 2012-06-22 at 16:43 +0200, Johannes Berg wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help