aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/ccid3.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-05-02 16:44:07 -0700
committerDavid S. Miller <davem@davemloft.net>2008-05-02 16:44:07 -0700
commit84994e16f25dabe234be4fc2d323ec9db95b87cb (patch)
treed30cc0144afe0f4640e432b4c0bd4a0f1f86c9ed /net/dccp/ccids/ccid3.c
parentnet: remove NR_CPUS arrays in net/core/dev.c (diff)
downloadlinux-dev-84994e16f25dabe234be4fc2d323ec9db95b87cb.tar.xz
linux-dev-84994e16f25dabe234be4fc2d323ec9db95b87cb.zip
dccp: ccid2.c, ccid3.c use clamp(), clamp_t()
Makes the intention of the nested min/max clear. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/dccp/ccids/ccid3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index e76f460af0ea..cd61dea2eea1 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -88,8 +88,8 @@ static void ccid3_hc_tx_set_state(struct sock *sk,
static inline u64 rfc3390_initial_rate(struct sock *sk)
{
const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
- const __u32 w_init = min_t(__u32, 4 * hctx->ccid3hctx_s,
- max_t(__u32, 2 * hctx->ccid3hctx_s, 4380));
+ const __u32 w_init = clamp_t(__u32, 4380U,
+ 2 * hctx->ccid3hctx_s, 4 * hctx->ccid3hctx_s);
return scaled_div(w_init << 6, hctx->ccid3hctx_rtt);
}