X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-cris%2Farch-v32%2Fchecksum.h;h=e5dcfce6e0dc1a5267739b67d9c8bab4233fb777;hb=29ca069cc6572cce62e42a27efdab01f50190616;hp=a1d6b2a6cc447d95201dca7479d4134ebf0cae71;hpb=2fca877b68b2b4fc5b94277858a1bedd46017cde;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-cris/arch-v32/checksum.h b/include/asm-cris/arch-v32/checksum.h index a1d6b2a6cc4..e5dcfce6e0d 100644 --- a/include/asm-cris/arch-v32/checksum.h +++ b/include/asm-cris/arch-v32/checksum.h @@ -9,11 +9,11 @@ * checksum. Which means it would be necessary to split all those into * 16-bit components and then add. */ -extern 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__ __volatile__ ("add.d %2, %0\n\t" "addc %3, %0\n\t" @@ -21,7 +21,7 @@ csum_tcpudp_nofold(unsigned long saddr, unsigned long daddr, "addc 0, %0\n\t" : "=r" (res) : "0" (sum), "r" (daddr), "r" (saddr), \ - "r" ((ntohs(len) << 16) + (proto << 8))); + "r" ((len + proto) << 8)); return res; }