[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1369151067-5220-1-git-send-email-fabio.estevam@freescale.com>
Date: Tue, 21 May 2013 12:44:26 -0300
From: Fabio Estevam <fabio.estevam@...escale.com>
To: <davem@...emloft.net>
CC: <shawn.guo@...aro.org>, <netdev@...r.kernel.org>,
<kernel@...gutronix.de>,
Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH 1/2] 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@...escale.com>
---
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 e277860..706e224 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;
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists