From: Arnaldo Carvalho de Melo Date: Fri, 9 Sep 2005 05:31:07 +0000 (-0300) Subject: [CCID3] Calculate ccid3hcrx_x_recv using usecs_div X-Git-Tag: v2.6.14-rc1~262^2~1^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=27ae543e6f116df66e2b19ff0a3aa1053e4784d8;p=linux-2.6-omap-h63xx.git [CCID3] Calculate ccid3hcrx_x_recv using usecs_div Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 37fd9eb8daa..63f897394a1 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -779,11 +779,8 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk) case TFRC_RSTATE_DATA: { const u32 delta = timeval_delta(&now, &hcrx->ccid3hcrx_tstamp_last_feedback); - - hcrx->ccid3hcrx_x_recv = (hcrx->ccid3hcrx_bytes_recv * - USEC_PER_SEC); - if (likely(delta > 1)) - hcrx->ccid3hcrx_x_recv /= delta; + hcrx->ccid3hcrx_x_recv = usecs_div(hcrx->ccid3hcrx_bytes_recv, + delta); } break; default: