aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid3.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-12-10 12:39:29 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-11 17:34:59 -0500
commit1fba78b6cba14bd37fdb12c5367f1e4d58ff2e0f (patch)
treedc606497372ac469f698fa2a31d956a67a62d739 /net/dccp/ccids/ccid3.c
parent9e8efc824098c241a1cde81f5558d222cb6f9369 (diff)
[DCCP] ccid3: Fixup some type conversions related to rtts
Spotted by David Miller when compiling on sparc64, I reproduced it here on parisc64, that are the only platforms to define __kernel_suseconds_t as an 'int', all the others, x86_64 and x86 included typedef it as a 'long', but from the definition of suseconds_t it should just be an 'int' on platforms where it is >= 32bits, it would not require all the castings from suseconds_t to (int) when printking variables of this type, that are not needed on parisc64 and sparc64. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/ccids/ccid3.c')
-rw-r--r--net/dccp/ccids/ccid3.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 6bc77ff20908..5e817e2f1ebc 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -399,7 +399,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
399 struct timeval now; 399 struct timeval now;
400 unsigned long t_nfb; 400 unsigned long t_nfb;
401 u32 pinv; 401 u32 pinv;
402 long r_sample, t_elapsed; 402 suseconds_t r_sample, t_elapsed;
403 403
404 BUG_ON(hctx == NULL); 404 BUG_ON(hctx == NULL);
405 405
@@ -446,8 +446,8 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
446 446
447 DCCP_BUG_ON(r_sample < 0); 447 DCCP_BUG_ON(r_sample < 0);
448 if (unlikely(r_sample <= t_elapsed)) 448 if (unlikely(r_sample <= t_elapsed))
449 DCCP_WARN("WARNING: r_sample=%ldus <= t_elapsed=%ldus\n", 449 DCCP_WARN("WARNING: r_sample=%dus <= t_elapsed=%dus\n",
450 r_sample, t_elapsed); 450 (int)r_sample, (int)t_elapsed);
451 else 451 else
452 r_sample -= t_elapsed; 452 r_sample -= t_elapsed;
453 CCID3_RTT_SANITY_CHECK(r_sample); 453 CCID3_RTT_SANITY_CHECK(r_sample);
@@ -474,8 +474,8 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
474 ccid3_update_send_time(hctx); 474 ccid3_update_send_time(hctx);
475 475
476 ccid3_pr_debug("%s(%p), s=%u, w_init=%llu, " 476 ccid3_pr_debug("%s(%p), s=%u, w_init=%llu, "
477 "R_sample=%ldus, X=%u\n", dccp_role(sk), 477 "R_sample=%dus, X=%u\n", dccp_role(sk),
478 sk, hctx->ccid3hctx_s, w_init, r_sample, 478 sk, hctx->ccid3hctx_s, w_init, (int)r_sample,
479 (unsigned)(hctx->ccid3hctx_x >> 6)); 479 (unsigned)(hctx->ccid3hctx_x >> 6));
480 480
481 ccid3_hc_tx_set_state(sk, TFRC_SSTATE_FBACK); 481 ccid3_hc_tx_set_state(sk, TFRC_SSTATE_FBACK);
@@ -491,9 +491,9 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
491 hctx->ccid3hctx_p); 491 hctx->ccid3hctx_p);
492 ccid3_hc_tx_update_x(sk, &now); 492 ccid3_hc_tx_update_x(sk, &now);
493 493
494 ccid3_pr_debug("%s(%p), RTT=%uus (sample=%ldus), s=%u, " 494 ccid3_pr_debug("%s(%p), RTT=%uus (sample=%dus), s=%u, "
495 "p=%u, X_calc=%u, X_recv=%u, X=%u\n", dccp_role(sk), 495 "p=%u, X_calc=%u, X_recv=%u, X=%u\n", dccp_role(sk),
496 sk, hctx->ccid3hctx_rtt, r_sample, 496 sk, hctx->ccid3hctx_rtt, (int)r_sample,
497 hctx->ccid3hctx_s, hctx->ccid3hctx_p, 497 hctx->ccid3hctx_s, hctx->ccid3hctx_p,
498 hctx->ccid3hctx_x_calc, 498 hctx->ccid3hctx_x_calc,
499 (unsigned)(hctx->ccid3hctx_x_recv >> 6), 499 (unsigned)(hctx->ccid3hctx_x_recv >> 6),
@@ -821,8 +821,8 @@ found:
821 DCCP_BUG_ON(delta < 0); 821 DCCP_BUG_ON(delta < 0);
822 822
823 rtt = delta * 4 / interval; 823 rtt = delta * 4 / interval;
824 ccid3_pr_debug("%s(%p), approximated RTT to %ldus\n", 824 ccid3_pr_debug("%s(%p), approximated RTT to %dus\n",
825 dccp_role(sk), sk, rtt); 825 dccp_role(sk), sk, (int)rtt);
826 826
827 /* 827 /*
828 * Determine the length of the first loss interval via inverse lookup. 828 * Determine the length of the first loss interval via inverse lookup.