Skip to content

Commit 97c20ea

Browse files
chelsiocudbgdavem330
authored andcommitted
cxgb4: fix 64-bit division on i386
Fix following compile error on i386 architecture. ERROR: "__udivdi3" [drivers/net/ethernet/chelsio/cxgb4/cxgb4.ko] undefined! Fixes: 0e395b3 ("cxgb4: add FLOWC based QoS offload") Reported-by: kbuild test robot <[email protected]> Signed-off-by: Rahul Lakkireddy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5bd2ce6 commit 97c20ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ static int cxgb4_mqprio_alloc_tc(struct net_device *dev,
307307
p.u.params.channel = pi->tx_chan;
308308
for (i = 0; i < mqprio->qopt.num_tc; i++) {
309309
/* Convert from bytes per second to Kbps */
310-
p.u.params.minrate = mqprio->min_rate[i] * 8 / 1000;
311-
p.u.params.maxrate = mqprio->max_rate[i] * 8 / 1000;
310+
p.u.params.minrate = div_u64(mqprio->min_rate[i] * 8, 1000);
311+
p.u.params.maxrate = div_u64(mqprio->max_rate[i] * 8, 1000);
312312

313313
e = cxgb4_sched_class_alloc(dev, &p);
314314
if (!e) {

0 commit comments

Comments
 (0)