From: Leslie Monis Date: Wed, 4 Mar 2020 18:56:00 +0000 (+0530) Subject: pie: remove unnecessary type casting X-Git-Tag: Ubuntu-5.10.0-12.13~3211^2~250^2~2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=220d4ac74ed691033b6fe2bd98dc07d6bdece046;p=mirror_ubuntu-hirsute-kernel.git 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: Mohit P. Tahiliani Signed-off-by: Gautam Ramakrishnan Signed-off-by: Leslie Monis Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c index 8a2f9f11c86f..198cfa34a00a 100644 --- a/net/sched/sch_pie.c +++ b/net/sched/sch_pie.c @@ -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 */ - delta += alpha * (u64)(qdelay - params->target); - delta += beta * (u64)(qdelay - qdelay_old); + delta += alpha * (qdelay - params->target); + delta += beta * (qdelay - qdelay_old); oldprob = vars->prob;