提交 7b487d07 编写于 作者: L Lothar Waßmann 提交者: David S. Miller

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: NLothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e453789a
......@@ -292,7 +292,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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册