summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon
diff options
context:
space:
mode:
authorLin Yun Sheng <linyunsheng@huawei.com>2017-08-04 11:24:59 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-04 20:06:59 +0200
commit967b2e2a76e380abdebe7f3c7ab17e8831accd21 (patch)
tree52c2681f86c319901803ebccbee8b97590ccc07e /drivers/net/ethernet/hisilicon
parentnet: phy: marvell: logical vs bitwise OR typo (diff)
downloadlinux-967b2e2a76e380abdebe7f3c7ab17e8831accd21.tar.xz
linux-967b2e2a76e380abdebe7f3c7ab17e8831accd21.zip
net: hns: Fix for __udivdi3 compiler error
This patch fixes the __udivdi3 undefined error reported by test robot. Fixes: b8c17f708831 ("net: hns: Add self-adaptive interrupt coalesce support in hns driver") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_enet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 832f27792e3f..36520634c96a 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -847,7 +847,8 @@ static void hns_update_rx_rate(struct hnae_ring *ring)
total_bytes = ring->stats.rx_bytes - ring->coal_last_rx_bytes;
time_passed_ms = jiffies_to_msecs(jiffies - ring->coal_last_jiffies);
- ring->coal_rx_rate = (total_bytes / time_passed_ms) >> 10;
+ do_div(total_bytes, time_passed_ms);
+ ring->coal_rx_rate = total_bytes >> 10;
ring->coal_last_rx_bytes = ring->stats.rx_bytes;
ring->coal_last_jiffies = jiffies;