diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-13 09:20:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-16 14:13:24 -0400 |
commit | 31e3c3f6f1f9b154981a0e6620df700463db30ee (patch) | |
tree | 5ed74529c528cc9a09d6f8c9a5083aaf4849b62e /net/tipc/dbg.c | |
parent | 15419227f773b6c1b5fae44bde876078a9204caa (diff) |
tipc: cleanup function namespace
Do some cleanups of TIPC based on make namespacecheck
1. Don't export unused symbols
2. Eliminate dead code
3. Make functions and variables local
4. Rename buf_acquire to tipc_buf_acquire since it is used in several files
Compile tested only.
This make break out of tree kernel modules that depend on TIPC routines.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/dbg.c')
-rw-r--r-- | net/tipc/dbg.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/tipc/dbg.c b/net/tipc/dbg.c index 6569d45bfb9a..46f51d208e5e 100644 --- a/net/tipc/dbg.c +++ b/net/tipc/dbg.c | |||
@@ -52,7 +52,7 @@ static struct print_buf null_buf = { NULL, 0, NULL, 0 }; | |||
52 | struct print_buf *const TIPC_NULL = &null_buf; | 52 | struct print_buf *const TIPC_NULL = &null_buf; |
53 | 53 | ||
54 | static struct print_buf cons_buf = { NULL, 0, NULL, 1 }; | 54 | static struct print_buf cons_buf = { NULL, 0, NULL, 1 }; |
55 | struct print_buf *const TIPC_CONS = &cons_buf; | 55 | static struct print_buf *const TIPC_CONS = &cons_buf; |
56 | 56 | ||
57 | static struct print_buf log_buf = { NULL, 0, NULL, 1 }; | 57 | static struct print_buf log_buf = { NULL, 0, NULL, 1 }; |
58 | struct print_buf *const TIPC_LOG = &log_buf; | 58 | struct print_buf *const TIPC_LOG = &log_buf; |
@@ -76,6 +76,10 @@ struct print_buf *const TIPC_LOG = &log_buf; | |||
76 | static char print_string[TIPC_PB_MAX_STR]; | 76 | static char print_string[TIPC_PB_MAX_STR]; |
77 | static DEFINE_SPINLOCK(print_lock); | 77 | static DEFINE_SPINLOCK(print_lock); |
78 | 78 | ||
79 | static void tipc_printbuf_reset(struct print_buf *pb); | ||
80 | static int tipc_printbuf_empty(struct print_buf *pb); | ||
81 | static void tipc_printbuf_move(struct print_buf *pb_to, | ||
82 | struct print_buf *pb_from); | ||
79 | 83 | ||
80 | #define FORMAT(PTR,LEN,FMT) \ | 84 | #define FORMAT(PTR,LEN,FMT) \ |
81 | {\ | 85 | {\ |
@@ -116,7 +120,7 @@ void tipc_printbuf_init(struct print_buf *pb, char *raw, u32 size) | |||
116 | * @pb: pointer to print buffer structure | 120 | * @pb: pointer to print buffer structure |
117 | */ | 121 | */ |
118 | 122 | ||
119 | void tipc_printbuf_reset(struct print_buf *pb) | 123 | static void tipc_printbuf_reset(struct print_buf *pb) |
120 | { | 124 | { |
121 | if (pb->buf) { | 125 | if (pb->buf) { |
122 | pb->crs = pb->buf; | 126 | pb->crs = pb->buf; |
@@ -132,7 +136,7 @@ void tipc_printbuf_reset(struct print_buf *pb) | |||
132 | * Returns non-zero if print buffer is empty. | 136 | * Returns non-zero if print buffer is empty. |
133 | */ | 137 | */ |
134 | 138 | ||
135 | int tipc_printbuf_empty(struct print_buf *pb) | 139 | static int tipc_printbuf_empty(struct print_buf *pb) |
136 | { | 140 | { |
137 | return !pb->buf || (pb->crs == pb->buf); | 141 | return !pb->buf || (pb->crs == pb->buf); |
138 | } | 142 | } |
@@ -181,7 +185,8 @@ int tipc_printbuf_validate(struct print_buf *pb) | |||
181 | * Source print buffer becomes empty if a successful move occurs. | 185 | * Source print buffer becomes empty if a successful move occurs. |
182 | */ | 186 | */ |
183 | 187 | ||
184 | void tipc_printbuf_move(struct print_buf *pb_to, struct print_buf *pb_from) | 188 | static void tipc_printbuf_move(struct print_buf *pb_to, |
189 | struct print_buf *pb_from) | ||
185 | { | 190 | { |
186 | int len; | 191 | int len; |
187 | 192 | ||