Commit 808b49da authored by Al Viro's avatar Al Viro

alpha: turn csum_partial_copy_from_user() into csum_and_copy_from_user()

It's already doing the right thing - it does access_ok() and the wrapper
in net/checksum.h is pointless here.  Just rename it and be done with that...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bfdaf029
...@@ -41,7 +41,8 @@ extern __wsum csum_partial(const void *buff, int len, __wsum sum); ...@@ -41,7 +41,8 @@ extern __wsum csum_partial(const void *buff, int len, __wsum sum);
* here even more important to align src and dst on a 32-bit (or even * here even more important to align src and dst on a 32-bit (or even
* better 64-bit) boundary * better 64-bit) boundary
*/ */
__wsum csum_partial_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *errp); #define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
__wsum csum_and_copy_from_user(const void __user *src, void *dst, int len, __wsum sum, int *errp);
__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum); __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum);
......
...@@ -325,7 +325,7 @@ csum_partial_cfu_unaligned(const unsigned long __user * src, ...@@ -325,7 +325,7 @@ csum_partial_cfu_unaligned(const unsigned long __user * src,
} }
__wsum __wsum
csum_partial_copy_from_user(const void __user *src, void *dst, int len, csum_and_copy_from_user(const void __user *src, void *dst, int len,
__wsum sum, int *errp) __wsum sum, int *errp)
{ {
unsigned long checksum = (__force u32) sum; unsigned long checksum = (__force u32) sum;
...@@ -369,7 +369,7 @@ csum_partial_copy_from_user(const void __user *src, void *dst, int len, ...@@ -369,7 +369,7 @@ csum_partial_copy_from_user(const void __user *src, void *dst, int len,
} }
return (__force __wsum)checksum; return (__force __wsum)checksum;
} }
EXPORT_SYMBOL(csum_partial_copy_from_user); EXPORT_SYMBOL(csum_and_copy_from_user);
__wsum __wsum
csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
...@@ -377,7 +377,7 @@ csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum) ...@@ -377,7 +377,7 @@ csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum)
__wsum checksum; __wsum checksum;
mm_segment_t oldfs = get_fs(); mm_segment_t oldfs = get_fs();
set_fs(KERNEL_DS); set_fs(KERNEL_DS);
checksum = csum_partial_copy_from_user((__force const void __user *)src, checksum = csum_and_copy_from_user((__force const void __user *)src,
dst, len, sum, NULL); dst, len, sum, NULL);
set_fs(oldfs); set_fs(oldfs);
return checksum; return checksum;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment