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>
This commit is contained in:
zhong jiang
2018-09-11 21:08:15 +08:00
committed by David S. Miller
parent db3df242bc
commit f8a1988f65
8 changed files with 8 additions and 8 deletions

View File

@@ -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 */