Skip to content

Commit 967b2e2

Browse files
Lin Yun Shengdavem330
authored andcommitted
net: hns: Fix for __udivdi3 compiler error
This patch fixes the __udivdi3 undefined error reported by test robot. Fixes: b8c17f7 ("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>
1 parent 5987feb commit 967b2e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/hisilicon/hns/hns_enet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,8 @@ static void hns_update_rx_rate(struct hnae_ring *ring)
847847

848848
total_bytes = ring->stats.rx_bytes - ring->coal_last_rx_bytes;
849849
time_passed_ms = jiffies_to_msecs(jiffies - ring->coal_last_jiffies);
850-
ring->coal_rx_rate = (total_bytes / time_passed_ms) >> 10;
850+
do_div(total_bytes, time_passed_ms);
851+
ring->coal_rx_rate = total_bytes >> 10;
851852

852853
ring->coal_last_rx_bytes = ring->stats.rx_bytes;
853854
ring->coal_last_jiffies = jiffies;

0 commit comments

Comments
 (0)