From: Lothar Waßmann Date: Mon, 17 Nov 2014 09:51:23 +0000 (+0100) Subject: net: fec: simplify loop counter handling in swap_buffer() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=823393f749444896a02e81f1fe5cb53cece83373;p=karo-tx-linux.git net: fec: simplify loop counter handling in swap_buffer() Eliminate the DIV_ROUND_UP() and change the loop counter increment to 4 instead. This results in saving 6 instructions in the functions assembly code. Signed-off-by: Lothar Waßmann Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 955c2a07d842..a269b0278f9c 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -296,7 +296,7 @@ static void *swap_buffer(void *bufaddr, int len) int i; unsigned int *buf = bufaddr; - for (i = 0; i < DIV_ROUND_UP(len, 4); i++, buf++) + for (i = 0; i < len; i += 4, buf++) swab32s(buf); return bufaddr;