From: Leslie Monis Date: Wed, 27 Feb 2019 01:00:06 +0000 (+0530) Subject: net: sched: pie: fix 64-bit division X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ff8285f81822dc8f528b36b6c5c8ab132367e92d;p=linux.git net: sched: pie: fix 64-bit division Use div_u64() to resolve build failures on 32-bit platforms. Fixes: 3f7ae5f3dc52 ("net: sched: pie: add more cases to auto-tune alpha and beta") Signed-off-by: Leslie Monis Reported-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c index 4c0670b6aec1b..f93cfe034c729 100644 --- a/net/sched/sch_pie.c +++ b/net/sched/sch_pie.c @@ -429,7 +429,7 @@ static void calculate_probability(struct Qdisc *sch) */ if (qdelay == 0 && qdelay_old == 0 && update_prob) - q->vars.prob = (q->vars.prob * 98) / 100; + q->vars.prob = 98 * div_u64(q->vars.prob, 100); q->vars.qdelay = qdelay; q->vars.qlen_old = qlen;