From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 5/8]: Move debugging macro to header file
Date: Fri, 15 Dec 2006 10:50:54 +0000 [thread overview]
Message-ID: <200612151050.54101@strip-the-willow> (raw)
[CCID3]: Move debugging macro to header file
This moves the ccid3_pr_debug macro into the header file,
so that it can be used from other files belonging to the
CCID3 framework as well.
Thanks to Ian McDonald for the suggestion.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid3.c | 8 +-------
net/dccp/ccids/ccid3.h | 7 +++++++
2 files changed, 8 insertions(+), 7 deletions(-)
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -41,13 +41,6 @@
#include "lib/tfrc.h"
#include "ccid3.h"
-#ifdef CONFIG_IP_DCCP_CCID3_DEBUG
-static int ccid3_debug;
-#define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a)
-#else
-#define ccid3_pr_debug(format, a...)
-#endif
-
static struct dccp_tx_hist *ccid3_tx_hist;
static struct dccp_rx_hist *ccid3_rx_hist;
static struct dccp_li_hist *ccid3_li_hist;
@@ -1227,6 +1220,7 @@ static struct ccid_operations ccid3 = {
};
#ifdef CONFIG_IP_DCCP_CCID3_DEBUG
+int ccid3_debug;
module_param(ccid3_debug, int, 0444);
MODULE_PARM_DESC(ccid3_debug, "Enable debug messages");
#endif
--- a/net/dccp/ccids/ccid3.h
+++ b/net/dccp/ccids/ccid3.h
@@ -61,6 +61,13 @@
rtt = CCID3_SANE_RTT_MAX; \
} } while (0)
+#ifdef CONFIG_IP_DCCP_CCID3_DEBUG
+extern int ccid3_debug;
+#define ccid3_pr_debug(format, a...) DCCP_PR_DEBUG(ccid3_debug, format, ##a)
+#else
+#define ccid3_pr_debug(format, a...)
+#endif
+
enum ccid3_options {
TFRC_OPT_LOSS_EVENT_RATE = 192,
TFRC_OPT_LOSS_INTERVALS = 193,
next reply other threads:[~2006-12-15 10:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 10:50 Gerrit Renker [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-12-15 21:47 [PATCH 5/8]: Move debugging macro to header file Ian McDonald
2006-12-18 8:23 ` Ian McDonald
2006-12-19 8:56 ` Gerrit Renker
2006-12-19 9:58 ` Ian McDonald
2006-12-19 10:09 ` Gerrit Renker
2006-12-19 17:59 ` Ian McDonald
2006-12-19 21:57 ` Arnaldo Carvalho de Melo
2006-12-19 22:14 ` Ian McDonald
2006-12-19 22:21 ` Arnaldo Carvalho de Melo
2006-12-19 22:38 ` Ian McDonald
2006-12-19 22:53 ` Arnaldo Carvalho de Melo
2006-12-19 23:08 ` Ian McDonald
2006-12-21 11:52 ` Gerrit Renker
2006-12-28 4:48 ` Ian McDonald
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200612151050.54101@strip-the-willow \
--to=gerrit@erg.abdn.ac.uk \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox