diff options
author | zhong jiang <zhongjiang@huawei.com> | 2018-09-11 16:08:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-13 06:34:47 +0300 |
commit | f8a1988f655192ae8ea6e1d940706a8340924bbc (patch) | |
tree | 6204f0a1b89706cc0b513394e74eabae8c369c0d /drivers/net/ethernet/cavium/liquidio | |
parent | db3df242bc4407ce92fdd0ec429e15bcfb961b00 (diff) | |
download | linux-f8a1988f655192ae8ea6e1d940706a8340924bbc.tar.xz |
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/cavium/liquidio')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c b/drivers/net/ethernet/cavium/liquidio/octeon_droq.c index ad621aa6e43a..a0c099f71524 100644 --- a/drivers/net/ethernet/cavium/liquidio/octeon_droq.c +++ b/drivers/net/ethernet/cavium/liquidio/octeon_droq.c @@ -526,7 +526,7 @@ int octeon_retry_droq_refill(struct octeon_droq *droq) static inline u32 octeon_droq_get_bufcount(u32 buf_size, u32 total_len) { - return ((total_len + buf_size - 1) / buf_size); + return DIV_ROUND_UP(total_len, buf_size); } static int |