diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-05-05 04:24:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-05 04:24:06 -0400 |
commit | 48c971394626173eaf1c33441ea1d900c88b21a3 (patch) | |
tree | ff4e128177139f56e861dae01bb5ab77f1f7554d /net/tipc/link.c | |
parent | 6063da9d74d4da812ae0d8f233b7e320e15765e3 (diff) |
tipc: Exclude debug-only print buffer code when not debugging
This patch modifies TIPC to only exclude debug-related print buffer
routines when debugging capabilities are not required. It also
fixes up some related #defines that exceed 80 characters.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 2a26a16e269f..bd206ebe4eea 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -147,9 +147,21 @@ static void link_print(struct link *l_ptr, struct print_buf *buf, | |||
147 | 147 | ||
148 | #define LINK_LOG_BUF_SIZE 0 | 148 | #define LINK_LOG_BUF_SIZE 0 |
149 | 149 | ||
150 | #define dbg_link(fmt, arg...) do {if (LINK_LOG_BUF_SIZE) tipc_printf(&l_ptr->print_buf, fmt, ## arg); } while(0) | 150 | #define dbg_link(fmt, arg...) \ |
151 | #define dbg_link_msg(msg, txt) do {if (LINK_LOG_BUF_SIZE) tipc_msg_print(&l_ptr->print_buf, msg, txt); } while(0) | 151 | do { \ |
152 | #define dbg_link_state(txt) do {if (LINK_LOG_BUF_SIZE) link_print(l_ptr, &l_ptr->print_buf, txt); } while(0) | 152 | if (LINK_LOG_BUF_SIZE) \ |
153 | tipc_printf(&l_ptr->print_buf, fmt, ## arg); \ | ||
154 | } while (0) | ||
155 | #define dbg_link_msg(msg, txt) \ | ||
156 | do { \ | ||
157 | if (LINK_LOG_BUF_SIZE) \ | ||
158 | tipc_msg_dbg(&l_ptr->print_buf, msg, txt); \ | ||
159 | } while (0) | ||
160 | #define dbg_link_state(txt) \ | ||
161 | do { \ | ||
162 | if (LINK_LOG_BUF_SIZE) \ | ||
163 | link_print(l_ptr, &l_ptr->print_buf, txt); \ | ||
164 | } while (0) | ||
153 | #define dbg_link_dump() do { \ | 165 | #define dbg_link_dump() do { \ |
154 | if (LINK_LOG_BUF_SIZE) { \ | 166 | if (LINK_LOG_BUF_SIZE) { \ |
155 | tipc_printf(LOG, "\n\nDumping link <%s>:\n", l_ptr->name); \ | 167 | tipc_printf(LOG, "\n\nDumping link <%s>:\n", l_ptr->name); \ |
@@ -1651,7 +1663,7 @@ static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) | |||
1651 | struct tipc_msg *msg = buf_msg(buf); | 1663 | struct tipc_msg *msg = buf_msg(buf); |
1652 | 1664 | ||
1653 | warn("Retransmission failure on link <%s>\n", l_ptr->name); | 1665 | warn("Retransmission failure on link <%s>\n", l_ptr->name); |
1654 | tipc_msg_print(TIPC_OUTPUT, msg, ">RETR-FAIL>"); | 1666 | tipc_msg_dbg(TIPC_OUTPUT, msg, ">RETR-FAIL>"); |
1655 | 1667 | ||
1656 | if (l_ptr->addr) { | 1668 | if (l_ptr->addr) { |
1657 | 1669 | ||