X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-sh%2Fchecksum.h;h=fa03b30c4269f6ee60080ba2982c4c986ca8417a;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=512ffe62c513e4845decb275797e02c2401d995e;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/include/asm-sh/checksum.h b/include/asm-sh/checksum.h index 512ffe62c..fa03b30c4 100644 --- a/include/asm-sh/checksum.h +++ b/include/asm-sh/checksum.h @@ -9,7 +9,7 @@ * Copyright (C) 1999 by Kaz Kojima & Niibe Yutaka */ -#include +#include /* * computes the checksum of a memory block at buff, length len, @@ -33,25 +33,25 @@ asmlinkage unsigned int csum_partial(const unsigned char * buff, int len, unsign * better 64-bit) boundary */ -asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, int len, int sum, - int *src_err_ptr, int *dst_err_ptr); +asmlinkage unsigned int csum_partial_copy_generic(const unsigned char *src, unsigned char *dst, + int len, int sum, int *src_err_ptr, int *dst_err_ptr); /* * Note: when you get a NULL pointer exception here this means someone * passed in an incorrect kernel address to one of these functions. * * If you use these functions directly please don't forget the - * verify_area(). + * access_ok(). */ static __inline__ -unsigned int csum_partial_copy_nocheck ( const char *src, char *dst, +unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst, int len, int sum) { return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL); } static __inline__ -unsigned int csum_partial_copy_from_user ( const char *src, char *dst, +unsigned int csum_partial_copy_from_user (const unsigned char *src, unsigned char *dst, int len, int sum, int *err_ptr) { return csum_partial_copy_generic ( src, dst, len, sum, err_ptr, NULL); @@ -159,7 +159,6 @@ static __inline__ unsigned short ip_compute_csum(unsigned char * buff, int len) } #define _HAVE_ARCH_IPV6_CSUM -#ifdef CONFIG_IPV6 static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, struct in6_addr *daddr, __u32 len, @@ -195,14 +194,13 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, return csum_fold(sum); } -#endif /* * 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) {