diff options
author | Eric Van Hensbergen <ericvh@gmail.com> | 2008-10-22 19:47:40 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@opteron.(none)> | 2008-10-22 19:47:40 -0400 |
commit | 0b15a3a5285bac2a2caa4ef970410674b6dd2de5 (patch) | |
tree | 219c22a3cc1ab961bff46308e64288ed63ff034d /net/9p/protocol.c | |
parent | 2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff) |
9p: fix debug build error
Fixes build problem with 9p when building with debug disabled.
Also contains some fixes for warnings which pop up when
CONFIG_NET_9P_DEBUG is disabled.
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/protocol.c')
-rw-r--r-- | net/9p/protocol.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/9p/protocol.c b/net/9p/protocol.c index 29be52439086..908e79faf48e 100644 --- a/net/9p/protocol.c +++ b/net/9p/protocol.c | |||
@@ -53,6 +53,7 @@ | |||
53 | static int | 53 | static int |
54 | p9pdu_writef(struct p9_fcall *pdu, int optional, const char *fmt, ...); | 54 | p9pdu_writef(struct p9_fcall *pdu, int optional, const char *fmt, ...); |
55 | 55 | ||
56 | #ifdef CONFIG_NET_9P_DEBUG | ||
56 | void | 57 | void |
57 | p9pdu_dump(int way, struct p9_fcall *pdu) | 58 | p9pdu_dump(int way, struct p9_fcall *pdu) |
58 | { | 59 | { |
@@ -81,6 +82,12 @@ p9pdu_dump(int way, struct p9_fcall *pdu) | |||
81 | else | 82 | else |
82 | P9_DPRINTK(P9_DEBUG_PKT, "]]](%d) %s\n", datalen, buf); | 83 | P9_DPRINTK(P9_DEBUG_PKT, "]]](%d) %s\n", datalen, buf); |
83 | } | 84 | } |
85 | #else | ||
86 | void | ||
87 | p9pdu_dump(int way, struct p9_fcall *pdu) | ||
88 | { | ||
89 | } | ||
90 | #endif | ||
84 | EXPORT_SYMBOL(p9pdu_dump); | 91 | EXPORT_SYMBOL(p9pdu_dump); |
85 | 92 | ||
86 | void p9stat_free(struct p9_wstat *stbuf) | 93 | void p9stat_free(struct p9_wstat *stbuf) |
@@ -542,8 +549,10 @@ int p9pdu_finalize(struct p9_fcall *pdu) | |||
542 | err = p9pdu_writef(pdu, 0, "d", size); | 549 | err = p9pdu_writef(pdu, 0, "d", size); |
543 | pdu->size = size; | 550 | pdu->size = size; |
544 | 551 | ||
552 | #ifdef CONFIG_NET_9P_DEBUG | ||
545 | if ((p9_debug_level & P9_DEBUG_PKT) == P9_DEBUG_PKT) | 553 | if ((p9_debug_level & P9_DEBUG_PKT) == P9_DEBUG_PKT) |
546 | p9pdu_dump(0, pdu); | 554 | p9pdu_dump(0, pdu); |
555 | #endif | ||
547 | 556 | ||
548 | P9_DPRINTK(P9_DEBUG_9P, ">>> size=%d type: %d tag: %d\n", pdu->size, | 557 | P9_DPRINTK(P9_DEBUG_9P, ">>> size=%d type: %d tag: %d\n", pdu->size, |
549 | pdu->id, pdu->tag); | 558 | pdu->id, pdu->tag); |