ipv4: Update parameters for csum_tcpudp_magic to their original types
[cascardo/linux.git] / arch / mn10300 / include / asm / checksum.h
index 9fb2a8d..c80df5b 100644 (file)
@@ -37,16 +37,11 @@ static inline __sum16 csum_fold(__wsum sum)
        return (~sum) >> 16;
 }
 
-static inline __wsum csum_tcpudp_nofold(unsigned long saddr,
-                                       unsigned long daddr,
-                                       unsigned short len,
-                                       unsigned short proto,
+static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
+                                       __u32 len, __u8 proto,
                                        __wsum sum)
 {
-       __wsum tmp;
-
-       tmp = (__wsum) ntohs(len) << 16;
-       tmp += (__wsum) proto << 8;
+       __wsum tmp = (__wsum)((len + proto) << 8);
 
        asm(
                "       add     %1,%0           \n"
@@ -64,10 +59,8 @@ static inline __wsum csum_tcpudp_nofold(unsigned long saddr,
  * computes the checksum of the TCP/UDP pseudo-header
  * returns a 16-bit checksum, already complemented
  */
-static inline __sum16 csum_tcpudp_magic(unsigned long saddr,
-                                       unsigned long daddr,
-                                       unsigned short len,
-                                       unsigned short proto,
+static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
+                                       __u32 len, __u8 proto,
                                        __wsum sum)
 {
        return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));