diff options
Diffstat (limited to 'arch/parisc/lib/checksum.c')
-rw-r--r-- | arch/parisc/lib/checksum.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/parisc/lib/checksum.c b/arch/parisc/lib/checksum.c index 8a1e08068e7..462696d30d3 100644 --- a/arch/parisc/lib/checksum.c +++ b/arch/parisc/lib/checksum.c | |||
@@ -101,11 +101,14 @@ out: | |||
101 | /* | 101 | /* |
102 | * computes a partial checksum, e.g. for TCP/UDP fragments | 102 | * computes a partial checksum, e.g. for TCP/UDP fragments |
103 | */ | 103 | */ |
104 | unsigned int csum_partial(const unsigned char *buff, int len, unsigned int sum) | 104 | /* |
105 | * why bother folding? | ||
106 | */ | ||
107 | __wsum csum_partial(const void *buff, int len, __wsum sum) | ||
105 | { | 108 | { |
106 | unsigned int result = do_csum(buff, len); | 109 | unsigned int result = do_csum(buff, len); |
107 | addc(result, sum); | 110 | addc(result, sum); |
108 | return from32to16(result); | 111 | return (__force __wsum)from32to16(result); |
109 | } | 112 | } |
110 | 113 | ||
111 | EXPORT_SYMBOL(csum_partial); | 114 | EXPORT_SYMBOL(csum_partial); |
@@ -113,8 +116,8 @@ EXPORT_SYMBOL(csum_partial); | |||
113 | /* | 116 | /* |
114 | * copy while checksumming, otherwise like csum_partial | 117 | * copy while checksumming, otherwise like csum_partial |
115 | */ | 118 | */ |
116 | unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst, | 119 | __wsum csum_partial_copy_nocheck(const void *src, void *dst, |
117 | int len, unsigned int sum) | 120 | int len, __wsum sum) |
118 | { | 121 | { |
119 | /* | 122 | /* |
120 | * It's 2:30 am and I don't feel like doing it real ... | 123 | * It's 2:30 am and I don't feel like doing it real ... |
@@ -131,9 +134,9 @@ EXPORT_SYMBOL(csum_partial_copy_nocheck); | |||
131 | * Copy from userspace and compute checksum. If we catch an exception | 134 | * Copy from userspace and compute checksum. If we catch an exception |
132 | * then zero the rest of the buffer. | 135 | * then zero the rest of the buffer. |
133 | */ | 136 | */ |
134 | unsigned int csum_partial_copy_from_user(const unsigned char __user *src, | 137 | __wsum csum_partial_copy_from_user(const void __user *src, |
135 | unsigned char *dst, int len, | 138 | void *dst, int len, |
136 | unsigned int sum, int *err_ptr) | 139 | __wsum sum, int *err_ptr) |
137 | { | 140 | { |
138 | int missing; | 141 | int missing; |
139 | 142 | ||