diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-14 21:15:19 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-02 21:23:02 -0800 |
commit | 3532010bcf7699f2ce9a2baab58b4b9a5426d97e (patch) | |
tree | 47d1c423fe2345bea93ff3a576363971b9b0a572 /include/asm-cris/arch-v10 | |
parent | 9be259aae5264511fe0a8b5e3d6711e0fd1d55df (diff) | |
download | kernel_samsung_smdk4412-3532010bcf7699f2ce9a2baab58b4b9a5426d97e.zip kernel_samsung_smdk4412-3532010bcf7699f2ce9a2baab58b4b9a5426d97e.tar.gz kernel_samsung_smdk4412-3532010bcf7699f2ce9a2baab58b4b9a5426d97e.tar.bz2 |
[NET]: Cris checksum annotations and cleanups.
* sanitize prototypes and annotate
* kill cast-as-lvalue abuses in csum_partial()
* usual ntohs-equals-shift for checksum purposes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-cris/arch-v10')
-rw-r--r-- | include/asm-cris/arch-v10/checksum.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-cris/arch-v10/checksum.h b/include/asm-cris/arch-v10/checksum.h index 633f234..b8000c5 100644 --- a/include/asm-cris/arch-v10/checksum.h +++ b/include/asm-cris/arch-v10/checksum.h @@ -8,11 +8,11 @@ * to split all of those into 16-bit components, then add. */ -static inline unsigned int -csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, - unsigned short proto, unsigned int sum) +static inline __wsum +csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, + unsigned short proto, __wsum sum) { - int res; + __wsum res; __asm__ ("add.d %2, %0\n\t" "ax\n\t" "add.d %3, %0\n\t" @@ -21,7 +21,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, unsigned short len, "ax\n\t" "addq 0, %0\n" : "=r" (res) - : "0" (sum), "r" (daddr), "r" (saddr), "r" ((ntohs(len) << 16) + (proto << 8))); + : "0" (sum), "r" (daddr), "r" (saddr), "r" ((len + proto) << 8)); return res; } |