* [PATCH net-next] net: hns: Fix for __udivdi3 compiler error
@ 2017-08-04 9:24 Yunsheng Lin
2017-08-04 18:07 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Yunsheng Lin @ 2017-08-04 9:24 UTC (permalink / raw)
To: davem
Cc: huangdaode, xuwei5, liguozhu, Yisen.Zhuang, gabriele.paoloni,
john.garry, linuxarm, yisen.zhuang, salil.mehta, lipeng321,
tremyfr, netdev, linux-kernel
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>
---
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 832f277..3652063 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;
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] net: hns: Fix for __udivdi3 compiler error
2017-08-04 9:24 [PATCH net-next] net: hns: Fix for __udivdi3 compiler error Yunsheng Lin
@ 2017-08-04 18:07 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-04 18:07 UTC (permalink / raw)
To: linyunsheng
Cc: huangdaode, xuwei5, liguozhu, Yisen.Zhuang, gabriele.paoloni,
john.garry, linuxarm, salil.mehta, lipeng321, tremyfr, netdev,
linux-kernel
From: Yunsheng Lin <linyunsheng@huawei.com>
Date: Fri, 4 Aug 2017 17:24:59 +0800
> 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>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-04 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-04 9:24 [PATCH net-next] net: hns: Fix for __udivdi3 compiler error Yunsheng Lin
2017-08-04 18:07 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox