Skip to content

Commit

Permalink
fec: Use DIV_ROUND_UP macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and David S. Miller committed May 23, 2013
1 parent f83331b commit ffed61e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ffed61e

Please sign in to comment.