diff options
author | Lothar Waßmann <LW@KARO-electronics.de> | 2014-11-17 09:51:23 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-18 20:19:32 (GMT) |
commit | 7b487d070a0edea01816135d3b1a9c8f2c069657 (patch) | |
tree | 8dd7a7e0592bc8309ffeb6883aa3296fb7e9475c /drivers | |
parent | e453789a66ab152ecee80ded3279539d826c48ed (diff) | |
download | linux-7b487d070a0edea01816135d3b1a9c8f2c069657.tar.xz |
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 <LW@KARO-electronics.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index f73fee7..dbccdf3 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -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; |