From ffed61e6fd3a405e79f4d267f22acaee3267fb37 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 21 May 2013 05:44:26 +0000 Subject: [PATCH] fec: Use DIV_ROUND_UP macro Use the standard DIV_ROUND_UP macro in order to provide better readability. Signed-off-by: Fabio Estevam Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- GitLab