Commit ffed61e6 authored by Fabio Estevam's avatar Fabio Estevam Committed by David S. Miller

fec: Use DIV_ROUND_UP macro

Use the standard DIV_ROUND_UP macro in order to provide better readability.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f83331ba
...@@ -242,7 +242,7 @@ static void *swap_buffer(void *bufaddr, int len) ...@@ -242,7 +242,7 @@ static void *swap_buffer(void *bufaddr, int len)
int i; int i;
unsigned int *buf = bufaddr; 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); *buf = cpu_to_be32(*buf);
return bufaddr; return bufaddr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment