summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/neterion/s2io.c
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-11 15:08:15 +0200
committerDavid S. Miller <davem@davemloft.net>2018-09-13 05:34:47 +0200
commitf8a1988f655192ae8ea6e1d940706a8340924bbc (patch)
tree6204f0a1b89706cc0b513394e74eabae8c369c0d /drivers/net/ethernet/neterion/s2io.c
parentqlcnic: Remove set but not used variables 'fw_mbx' and 'hdr_size' (diff)
downloadlinux-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/neterion/s2io.c')
-rw-r--r--drivers/net/ethernet/neterion/s2io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index b8983e73265a..f980f103555b 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -491,7 +491,7 @@ static struct pci_driver s2io_driver = {
};
/* A simplifier macro used both by init and free shared_mem Fns(). */
-#define TXD_MEM_PAGE_CNT(len, per_each) ((len+per_each - 1) / per_each)
+#define TXD_MEM_PAGE_CNT(len, per_each) DIV_ROUND_UP(len, per_each)
/* netqueue manipulation helper functions */
static inline void s2io_stop_all_tx_queue(struct s2io_nic *sp)