diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2006-11-20 15:26:03 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:24:35 -0500 |
commit | 84116716cc9404356f775443b460f76766f08f65 (patch) | |
tree | 627662e0ac97542de873ed2071561ba2c2f0ba8e /net/dccp/ackvec.c | |
parent | f123bc5f800d528e59684c7faffda88b4dd2d38c (diff) |
[DCCP]: enable debug messages also for static builds
This patch
* makes debugging (when configured) work both for static / module build
* provides generic debugging macros for use in other DCCP / CCID modules
* adds missing information about debug parameters to Kconfig
* performs some code tidy-up
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/ackvec.c')
-rw-r--r-- | net/dccp/ackvec.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c index bd20a2c55e25..d34badcd012e 100644 --- a/net/dccp/ackvec.c +++ b/net/dccp/ackvec.c | |||
@@ -318,21 +318,18 @@ out_duplicate: | |||
318 | #ifdef CONFIG_IP_DCCP_DEBUG | 318 | #ifdef CONFIG_IP_DCCP_DEBUG |
319 | void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len) | 319 | void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len) |
320 | { | 320 | { |
321 | if (!dccp_debug) | 321 | dccp_pr_debug_cat("ACK vector len=%d, ackno=%llu |", len, |
322 | return; | 322 | (unsigned long long)ackno); |
323 | |||
324 | printk("ACK vector len=%d, ackno=%llu |", len, | ||
325 | (unsigned long long)ackno); | ||
326 | 323 | ||
327 | while (len--) { | 324 | while (len--) { |
328 | const u8 state = (*vector & DCCP_ACKVEC_STATE_MASK) >> 6; | 325 | const u8 state = (*vector & DCCP_ACKVEC_STATE_MASK) >> 6; |
329 | const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK; | 326 | const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK; |
330 | 327 | ||
331 | printk("%d,%d|", state, rl); | 328 | dccp_pr_debug_cat("%d,%d|", state, rl); |
332 | ++vector; | 329 | ++vector; |
333 | } | 330 | } |
334 | 331 | ||
335 | printk("\n"); | 332 | dccp_pr_debug_cat("\n"); |
336 | } | 333 | } |
337 | 334 | ||
338 | void dccp_ackvec_print(const struct dccp_ackvec *av) | 335 | void dccp_ackvec_print(const struct dccp_ackvec *av) |