aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m32r
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-15 00:16:55 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:06 -0500
commit85d20dee20f0958df1615e73698f6b0c525812f7 (patch)
tree47ddcace761e2c26da0dafc437cef5a2ec852183 /arch/m32r
parent322529961e3b3e64fdf1a3e46a45294456c91acf (diff)
[NET]: M32R checksum annotations and cleanups.
* sanitize prototypes, annotate * ntohs -> shift in checksum calculations in l-e case * kill shift-by-16 in checksum calculations Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/m32r')
-rw-r--r--arch/m32r/lib/csum_partial_copy.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/m32r/lib/csum_partial_copy.c b/arch/m32r/lib/csum_partial_copy.c
index 3d5f06145854..5596f3df833f 100644
--- a/arch/m32r/lib/csum_partial_copy.c
+++ b/arch/m32r/lib/csum_partial_copy.c
@@ -27,9 +27,8 @@
27/* 27/*
28 * Copy while checksumming, otherwise like csum_partial 28 * Copy while checksumming, otherwise like csum_partial
29 */ 29 */
30unsigned int 30__wsum
31csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst, 31csum_partial_copy_nocheck (const void *src, void *dst, int len, __wsum sum)
32 int len, unsigned int sum)
33{ 32{
34 sum = csum_partial(src, len, sum); 33 sum = csum_partial(src, len, sum);
35 memcpy(dst, src, len); 34 memcpy(dst, src, len);
@@ -42,10 +41,9 @@ EXPORT_SYMBOL(csum_partial_copy_nocheck);
42 * Copy from userspace and compute checksum. If we catch an exception 41 * Copy from userspace and compute checksum. If we catch an exception
43 * then zero the rest of the buffer. 42 * then zero the rest of the buffer.
44 */ 43 */
45unsigned int 44__wsum
46csum_partial_copy_from_user (const unsigned char __user *src, 45csum_partial_copy_from_user (const void __user *src, void *dst,
47 unsigned char *dst, 46 int len, __wsum sum, int *err_ptr)
48 int len, unsigned int sum, int *err_ptr)
49{ 47{
50 int missing; 48 int missing;
51 49