[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>
This commit is contained in:
Gerrit Renker
2006-11-20 18:26:03 -02:00
committed by David S. Miller
parent f123bc5f80
commit 84116716cc
5 changed files with 38 additions and 27 deletions
+4 -7
View File
@@ -318,21 +318,18 @@ out_duplicate:
#ifdef CONFIG_IP_DCCP_DEBUG
void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len)
{
if (!dccp_debug)
return;
printk("ACK vector len=%d, ackno=%llu |", len,
(unsigned long long)ackno);
dccp_pr_debug_cat("ACK vector len=%d, ackno=%llu |", len,
(unsigned long long)ackno);
while (len--) {
const u8 state = (*vector & DCCP_ACKVEC_STATE_MASK) >> 6;
const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK;
printk("%d,%d|", state, rl);
dccp_pr_debug_cat("%d,%d|", state, rl);
++vector;
}
printk("\n");
dccp_pr_debug_cat("\n");
}
void dccp_ackvec_print(const struct dccp_ackvec *av)