diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-10-05 00:24:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-07 02:12:07 -0400 |
commit | 1f4f0f645cc1d7f1187fcdb0ac22c2e69bd68050 (patch) | |
tree | 6db6ea3a0bb27188d06db6bbf093842d7007f836 /net/dccp/proto.c | |
parent | 10e7e9c44d442275951d1cfc892c1c6606c85c94 (diff) |
dccp: Kill dead code and add static markers.
Remove dead code and make some functions static.
Compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r-- | net/dccp/proto.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index 096250d1323b..b054ba1f55d2 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -50,6 +50,30 @@ EXPORT_SYMBOL_GPL(dccp_hashinfo); | |||
50 | /* the maximum queue length for tx in packets. 0 is no limit */ | 50 | /* the maximum queue length for tx in packets. 0 is no limit */ |
51 | int sysctl_dccp_tx_qlen __read_mostly = 5; | 51 | int sysctl_dccp_tx_qlen __read_mostly = 5; |
52 | 52 | ||
53 | #ifdef CONFIG_IP_DCCP_DEBUG | ||
54 | static const char *dccp_state_name(const int state) | ||
55 | { | ||
56 | static const char *const dccp_state_names[] = { | ||
57 | [DCCP_OPEN] = "OPEN", | ||
58 | [DCCP_REQUESTING] = "REQUESTING", | ||
59 | [DCCP_PARTOPEN] = "PARTOPEN", | ||
60 | [DCCP_LISTEN] = "LISTEN", | ||
61 | [DCCP_RESPOND] = "RESPOND", | ||
62 | [DCCP_CLOSING] = "CLOSING", | ||
63 | [DCCP_ACTIVE_CLOSEREQ] = "CLOSEREQ", | ||
64 | [DCCP_PASSIVE_CLOSE] = "PASSIVE_CLOSE", | ||
65 | [DCCP_PASSIVE_CLOSEREQ] = "PASSIVE_CLOSEREQ", | ||
66 | [DCCP_TIME_WAIT] = "TIME_WAIT", | ||
67 | [DCCP_CLOSED] = "CLOSED", | ||
68 | }; | ||
69 | |||
70 | if (state >= DCCP_MAX_STATES) | ||
71 | return "INVALID STATE!"; | ||
72 | else | ||
73 | return dccp_state_names[state]; | ||
74 | } | ||
75 | #endif | ||
76 | |||
53 | void dccp_set_state(struct sock *sk, const int state) | 77 | void dccp_set_state(struct sock *sk, const int state) |
54 | { | 78 | { |
55 | const int oldstate = sk->sk_state; | 79 | const int oldstate = sk->sk_state; |
@@ -146,30 +170,6 @@ const char *dccp_packet_name(const int type) | |||
146 | 170 | ||
147 | EXPORT_SYMBOL_GPL(dccp_packet_name); | 171 | EXPORT_SYMBOL_GPL(dccp_packet_name); |
148 | 172 | ||
149 | const char *dccp_state_name(const int state) | ||
150 | { | ||
151 | static const char *const dccp_state_names[] = { | ||
152 | [DCCP_OPEN] = "OPEN", | ||
153 | [DCCP_REQUESTING] = "REQUESTING", | ||
154 | [DCCP_PARTOPEN] = "PARTOPEN", | ||
155 | [DCCP_LISTEN] = "LISTEN", | ||
156 | [DCCP_RESPOND] = "RESPOND", | ||
157 | [DCCP_CLOSING] = "CLOSING", | ||
158 | [DCCP_ACTIVE_CLOSEREQ] = "CLOSEREQ", | ||
159 | [DCCP_PASSIVE_CLOSE] = "PASSIVE_CLOSE", | ||
160 | [DCCP_PASSIVE_CLOSEREQ] = "PASSIVE_CLOSEREQ", | ||
161 | [DCCP_TIME_WAIT] = "TIME_WAIT", | ||
162 | [DCCP_CLOSED] = "CLOSED", | ||
163 | }; | ||
164 | |||
165 | if (state >= DCCP_MAX_STATES) | ||
166 | return "INVALID STATE!"; | ||
167 | else | ||
168 | return dccp_state_names[state]; | ||
169 | } | ||
170 | |||
171 | EXPORT_SYMBOL_GPL(dccp_state_name); | ||
172 | |||
173 | int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) | 173 | int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) |
174 | { | 174 | { |
175 | struct dccp_sock *dp = dccp_sk(sk); | 175 | struct dccp_sock *dp = dccp_sk(sk); |