Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b487d07 authored by Lothar Waßmann's avatar Lothar Waßmann Committed by David S. Miller
Browse files

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: default avatarLothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e453789a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;