summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-05-21 05:44:26 +0000
committerDavid S. Miller <davem@davemloft.net>2013-05-23 00:05:34 -0700
commitffed61e6fd3a405e79f4d267f22acaee3267fb37 (patch)
treef2978f0fa74c0bc1efaef7aec61d6013176f42f7 /drivers/net/ethernet
parentf83331bab149e29fa2c49cf102c0cd8c3f1ce9f9 (diff)
fec: Use DIV_ROUND_UP macro
Use the standard DIV_ROUND_UP macro in order to provide better readability. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 2f4b3e028012..6b5dc58c56d8 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -242,7 +242,7 @@ static void *swap_buffer(void *bufaddr, int len)
int i;
unsigned int *buf = bufaddr;
- for (i = 0; i < (len + 3) / 4; i++, buf++)
+ for (i = 0; i < DIV_ROUND_UP(len, 4); i++, buf++)
*buf = cpu_to_be32(*buf);
return bufaddr;