Re: [PATCH 5/8]: Move debugging macro to header file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK. Go to use this in net/dccp/ccids/lib/loss_interval.c and get this:
WARNING: "ccid3_debug" [net/dccp/ccids/lib/dccp_tfrc_lib.ko] undefined!

So I think I'll just do this in ccid3.c
EXPORT_SYMBOL_GPL(ccid3_debug);

and now I get this:
WARNING: Module
/lib/modules/2.6.20-rc1davem20/kernel/net/dccp/ccids/lib/dccp_tfrc_lib.ko
ignored, due to loop
WARNING: Loop detected:
/home/ian/tmp/lib/modules/2.6.20-rc1davem20/kernel/net/dccp/ccids/dccp_ccid3.ko
needs dccp_tfrc_lib.ko which needs dccp_ccid3.ko again!
WARNING: Module
/lib/modules/2.6.20-rc1davem20/kernel/net/dccp/ccids/dccp_ccid3.ko
ignored, due to loop

Hmm... what to do now? These need refactoring anyway but I was hoping
not to have to do that now.

Regards,

Ian

On 12/15/06, Gerrit Renker <gerrit@xxxxxxxxxxxxxx> wrote:
[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@xxxxxxxxxxxxxx>
--- 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,
-

--
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.com
WAND Network Research Group
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux