summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-09-11 21:08:15 +0800
committerDavid S. Miller <davem@davemloft.net>2018-09-12 20:34:47 -0700
commitf8a1988f655192ae8ea6e1d940706a8340924bbc (patch)
tree6204f0a1b89706cc0b513394e74eabae8c369c0d /drivers/net/ethernet/broadcom
parentdb3df242bc4407ce92fdd0ec429e15bcfb961b00 (diff)
downloadtalos-obmc-linux-f8a1988f655192ae8ea6e1d940706a8340924bbc.tar.gz
talos-obmc-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/broadcom')
-rw-r--r--drivers/net/ethernet/broadcom/sb1250-mac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index 53acbbb36637..c44cff54262c 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -156,7 +156,7 @@ enum sbmac_state {
(d)->sbdma_dscrtable : (d)->f+1)
-#define NUMCACHEBLKS(x) (((x)+SMP_CACHE_BYTES-1)/SMP_CACHE_BYTES)
+#define NUMCACHEBLKS(x) DIV_ROUND_UP(x, SMP_CACHE_BYTES)
#define SBMAC_MAX_TXDESCR 256
#define SBMAC_MAX_RXDESCR 256
OpenPOWER on IntegriCloud