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:

committed by
David S. Miller

parent
db3df242bc
commit
f8a1988f65
@@ -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 */
|
||||
|
Reference in New Issue
Block a user