X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-mips%2Fchecksum.h;h=c25cc92b99508b4886aa4e021beafda484926d09;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=06542646827223d1df960de5f82b415e13ffb2e0;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index 065426468..c25cc92b9 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h @@ -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