Commit 220d4ac7 authored by Leslie Monis's avatar Leslie Monis Committed by David S. Miller

pie: remove unnecessary type casting

In function pie_calculate_probability(), the variables alpha and
beta are of type u64. The variables qdelay, qdelay_old and
params->target are of type psched_time_t (which is also u64).
The explicit type casting done when calculating the value for
the variable delta is redundant and not required.
Signed-off-by: default avatarMohit P. Tahiliani <tahiliani@nitk.edu.in>
Signed-off-by: default avatarGautam Ramakrishnan <gautamramk@gmail.com>
Signed-off-by: default avatarLeslie Monis <lesliemonis@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90baeb9d
...@@ -363,8 +363,8 @@ void pie_calculate_probability(struct pie_params *params, struct pie_vars *vars, ...@@ -363,8 +363,8 @@ void pie_calculate_probability(struct pie_params *params, struct pie_vars *vars,
} }
/* alpha and beta should be between 0 and 32, in multiples of 1/16 */ /* alpha and beta should be between 0 and 32, in multiples of 1/16 */
delta += alpha * (u64)(qdelay - params->target); delta += alpha * (qdelay - params->target);
delta += beta * (u64)(qdelay - qdelay_old); delta += beta * (qdelay - qdelay_old);
oldprob = vars->prob; oldprob = vars->prob;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment