diff options
author | zhong jiang <zhongjiang@huawei.com> | 2018-09-11 15:08:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-13 05:34:47 +0200 |
commit | f8a1988f655192ae8ea6e1d940706a8340924bbc (patch) | |
tree | 6204f0a1b89706cc0b513394e74eabae8c369c0d /drivers/net/ethernet/freescale/gianfar_ethtool.c | |
parent | qlcnic: Remove set but not used variables 'fw_mbx' and 'hdr_size' (diff) | |
download | linux-f8a1988f655192ae8ea6e1d940706a8340924bbc.tar.xz linux-f8a1988f655192ae8ea6e1d940706a8340924bbc.zip |
net: ethernet: Use DIV_ROUND_UP instead of reimplementing its function
DIV_ROUND_UP has implemented the code-opened function. Therefore, just
replace the implementation with DIV_ROUND_UP.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Acked-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/gianfar_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/freescale/gianfar_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c index d3662965f59d..0d76e15cd6dd 100644 --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c @@ -230,7 +230,7 @@ static unsigned int gfar_usecs2ticks(struct gfar_private *priv, /* Make sure we return a number greater than 0 * if usecs > 0 */ - return (usecs * 1000 + count - 1) / count; + return DIV_ROUND_UP(usecs * 1000, count); } /* Convert ethernet clock ticks to microseconds */ |