Merge git://git.infradead.org/~dwmw2/firmware-2.6
[sfrench/cifs-2.6.git] / arch / m68k / lib / checksum.c
index cb13c6e3ccaeb6449dd2d99898f9e1ee53eb50d5..6216f12a756b56121361639116794e35d8356ad2 100644 (file)
@@ -39,8 +39,7 @@
  * computes a partial checksum, e.g. for TCP/UDP fragments
  */
 
-unsigned int
-csum_partial (const unsigned char *buff, int len, unsigned int sum)
+__wsum csum_partial(const void *buff, int len, __wsum sum)
 {
        unsigned long tmp1, tmp2;
          /*
@@ -133,9 +132,9 @@ EXPORT_SYMBOL(csum_partial);
  * copy from user space while checksumming, with exception handling.
  */
 
-unsigned int
-csum_partial_copy_from_user(const unsigned char __user *src, unsigned char *dst,
-                           int len, int sum, int *csum_err)
+__wsum
+csum_partial_copy_from_user(const void __user *src, void *dst,
+                           int len, __wsum sum, int *csum_err)
 {
        /*
         * GCC doesn't like more than 10 operands for the asm
@@ -321,12 +320,15 @@ csum_partial_copy_from_user(const unsigned char __user *src, unsigned char *dst,
        return(sum);
 }
 
+EXPORT_SYMBOL(csum_partial_copy_from_user);
+
+
 /*
  * copy from kernel space while checksumming, otherwise like csum_partial
  */
 
-unsigned int
-csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int len, int sum)
+__wsum
+csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
 {
        unsigned long tmp1, tmp2;
        __asm__("movel %2,%4\n\t"
@@ -420,3 +422,4 @@ csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, int len,
            );
     return(sum);
 }
+EXPORT_SYMBOL(csum_partial_copy_nocheck);