vserver 1.9.5.x5
[linux-2.6.git] / include / asm-mips / checksum.h
index 0654264..c25cc92 100644 (file)
@@ -34,18 +34,19 @@ 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,
  * but continues and zeros the rest of the buffer.
  */
-unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len,
+unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, int len,
                                          unsigned int sum, int *errp);
 
 /*
  * Copy and checksum to user
  */
 #define HAVE_CSUM_COPY_USER
-static inline unsigned int csum_and_copy_to_user (const char *src, 
-                                                 char __user *dst,
+static inline unsigned int csum_and_copy_to_user (const unsigned char *src,
+                                                 unsigned char __user *dst,
                                                  int len, int sum,
                                                  int *err_ptr)
 {
+       might_sleep();
        sum = csum_partial(src, len, sum);
 
        if (copy_to_user(dst, src, len)) {
@@ -60,8 +61,8 @@ static inline unsigned int csum_and_copy_to_user (const char *src,
  * the same as csum_partial, but copies from user space (but on MIPS
  * we have just one address space, so this is identical to the above)
  */
-unsigned int csum_partial_copy_nocheck(const char *src, char *dst, int len,
-                                      unsigned int sum);
+unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst,
+                                      int len, unsigned int sum);
 
 /*
  *     Fold a partial checksum without adding pseudo headers