diff options
Diffstat (limited to 'include/asm-mips/checksum.h')
-rw-r--r-- | include/asm-mips/checksum.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index 186c9d6a6..a9b5d7e54 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h @@ -22,7 +22,7 @@ * * it's best to have buff aligned on a 32-bit boundary */ -unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum); +unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum); /* * this is a new version of the above that records errors it finds in *errp, @@ -41,9 +41,9 @@ unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len, * Copy and checksum to user */ #define HAVE_CSUM_COPY_USER -extern inline unsigned int -csum_and_copy_to_user (const char *src, char *dst, - int len, int sum, int *err_ptr) +extern inline unsigned int csum_and_copy_to_user (const char *src, char *dst, + int len, int sum, + int *err_ptr) { sum = csum_partial(src, len, sum); @@ -62,8 +62,9 @@ csum_and_copy_to_user (const char *src, char *dst, * this is obsolete and will go away. */ #define csum_partial_copy_fromuser csum_partial_copy -unsigned int csum_partial_copy(const char *src, char *dst, int len, unsigned int sum); - +unsigned int csum_partial_copy(const char *src, char *dst, int len, + unsigned int sum); + /* * Fold a partial checksum without adding pseudo headers */ @@ -92,7 +93,7 @@ static inline unsigned short int csum_fold(unsigned int sum) * By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by * Arnt Gulbrandsen. */ -static inline unsigned short ip_fast_csum(unsigned char * iph, +static inline unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl) { unsigned int sum; @@ -169,7 +170,7 @@ static inline unsigned long csum_tcpudp_nofold(unsigned long saddr, #else "r" (((proto)<<16)+len), #endif - "r"(sum) + "r" (sum) : "$1"); return sum; @@ -185,7 +186,7 @@ static inline unsigned short int csum_tcpudp_magic(unsigned long saddr, unsigned short proto, unsigned int sum) { - return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); + return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)); } /* @@ -256,7 +257,7 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, ".set\tnoreorder" : "=r" (sum), "=r" (proto) : "r" (saddr), "r" (daddr), - "0" (htonl(len)), "1" (htonl(proto)), "r"(sum) + "0" (htonl(len)), "1" (htonl(proto)), "r" (sum) : "$1"); return csum_fold(sum); |