diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-06-11 06:19:09 -0400 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2008-06-11 06:19:09 -0400 |
commit | 1e2f0e5e8376f2a0ada8760fc9d3104e1a81382b (patch) | |
tree | 8e0dc375e574092814d7d020292cf6df67db5bb1 /net/dccp/ackvec.c | |
parent | 3294f202dc1acd82223e83ef59f272bd87bb06b2 (diff) |
dccp: Fix sparse warnings
This patch fixes the following sparse warnings:
* nested min(max()) expression:
net/dccp/ccids/ccid3.c:91:21: warning: symbol '__x' shadows an earlier one
net/dccp/ccids/ccid3.c:91:21: warning: symbol '__y' shadows an earlier one
* Declaration of function prototypes in .c instead of .h file, resulting in
"should it be static?" warnings.
* Declared "struct dccpw" static (local to dccp_probe).
* Disabled dccp_delayed_ack() - not fully removed due to RFC 4340, 11.3
("Receivers SHOULD implement delayed acknowledgement timers ...").
* Used a different local variable name to avoid
net/dccp/ackvec.c:293:13: warning: symbol 'state' shadows an earlier one
net/dccp/ackvec.c:238:33: originally declared here
* Removed unused functions `dccp_ackvector_print' and `dccp_ackvec_print'.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/ackvec.c')
-rw-r--r-- | net/dccp/ackvec.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c index 6de4bd195d28..1e8be246ad15 100644 --- a/net/dccp/ackvec.c +++ b/net/dccp/ackvec.c | |||
@@ -290,12 +290,12 @@ int dccp_ackvec_add(struct dccp_ackvec *av, const struct sock *sk, | |||
290 | 290 | ||
291 | while (1) { | 291 | while (1) { |
292 | const u8 len = dccp_ackvec_len(av, index); | 292 | const u8 len = dccp_ackvec_len(av, index); |
293 | const u8 state = dccp_ackvec_state(av, index); | 293 | const u8 av_state = dccp_ackvec_state(av, index); |
294 | /* | 294 | /* |
295 | * valid packets not yet in av_buf have a reserved | 295 | * valid packets not yet in av_buf have a reserved |
296 | * entry, with a len equal to 0. | 296 | * entry, with a len equal to 0. |
297 | */ | 297 | */ |
298 | if (state == DCCP_ACKVEC_STATE_NOT_RECEIVED && | 298 | if (av_state == DCCP_ACKVEC_STATE_NOT_RECEIVED && |
299 | len == 0 && delta == 0) { /* Found our | 299 | len == 0 && delta == 0) { /* Found our |
300 | reserved seat! */ | 300 | reserved seat! */ |
301 | dccp_pr_debug("Found %llu reserved seat!\n", | 301 | dccp_pr_debug("Found %llu reserved seat!\n", |
@@ -325,31 +325,6 @@ out_duplicate: | |||
325 | return -EILSEQ; | 325 | return -EILSEQ; |
326 | } | 326 | } |
327 | 327 | ||
328 | #ifdef CONFIG_IP_DCCP_DEBUG | ||
329 | void dccp_ackvector_print(const u64 ackno, const unsigned char *vector, int len) | ||
330 | { | ||
331 | dccp_pr_debug_cat("ACK vector len=%d, ackno=%llu |", len, | ||
332 | (unsigned long long)ackno); | ||
333 | |||
334 | while (len--) { | ||
335 | const u8 state = (*vector & DCCP_ACKVEC_STATE_MASK) >> 6; | ||
336 | const u8 rl = *vector & DCCP_ACKVEC_LEN_MASK; | ||
337 | |||
338 | dccp_pr_debug_cat("%d,%d|", state, rl); | ||
339 | ++vector; | ||
340 | } | ||
341 | |||
342 | dccp_pr_debug_cat("\n"); | ||
343 | } | ||
344 | |||
345 | void dccp_ackvec_print(const struct dccp_ackvec *av) | ||
346 | { | ||
347 | dccp_ackvector_print(av->av_buf_ackno, | ||
348 | av->av_buf + av->av_buf_head, | ||
349 | av->av_vec_len); | ||
350 | } | ||
351 | #endif | ||
352 | |||
353 | static void dccp_ackvec_throw_record(struct dccp_ackvec *av, | 328 | static void dccp_ackvec_throw_record(struct dccp_ackvec *av, |
354 | struct dccp_ackvec_record *avr) | 329 | struct dccp_ackvec_record *avr) |
355 | { | 330 | { |