[ARM] Improve csum_fold, cleanup csum_tcpudp_magic()
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 21 Dec 2006 20:59:37 +0000 (20:59 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 6 Feb 2007 16:46:46 +0000 (16:46 +0000)
commit7ef416c4b878685a419a3b2f133ab5e7283f96b0
treeb3a32e3e3f4f3329a624d553aed297e8fcbcf60e
parent10c03f69680e9e2acd8a9409a230aef37295ac49
[ARM] Improve csum_fold, cleanup csum_tcpudp_magic()

csum_fold doesn't need two assembly instructions to perform its task,
it can simply add the high and low parts together by rotating by 16
bits, and the carry into the upper-16 bits will automatically happen.

Also, since csum_tcpudp_magic() is just csum_tcpudp_nofold + csum_fold,
use those two functions to achieve this.  Also note that there is a
csum_fold() at the end of ip_fast_csum() as well, so use the real
csum_fold() there as well.

Boot tested on Versatile.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/asm-arm/checksum.h