git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
v850
/
lib
/
checksum.c
diff --git
a/arch/v850/lib/checksum.c
b/arch/v850/lib/checksum.c
index
fa58726
..
042158d
100644
(file)
--- a/
arch/v850/lib/checksum.c
+++ b/
arch/v850/lib/checksum.c
@@
-88,32
+88,32
@@
out:
* This is a version of ip_compute_csum() optimized for IP headers,
* which always checksum on 4 octet boundaries.
*/
* This is a version of ip_compute_csum() optimized for IP headers,
* which always checksum on 4 octet boundaries.
*/
-
unsigned short ip_fast_csum(unsigned char *
iph, unsigned int ihl)
+
__sum16 ip_fast_csum(const void *
iph, unsigned int ihl)
{
{
- return ~do_csum(iph,ihl*4);
+ return
(__force __sum16)
~do_csum(iph,ihl*4);
}
/*
* this routine is used for miscellaneous IP-like checksums, mainly
* in icmp.c
*/
}
/*
* this routine is used for miscellaneous IP-like checksums, mainly
* in icmp.c
*/
-
unsigned short ip_compute_csum(const unsigned char *
buff, int len)
+
__sum16 ip_compute_csum(const void *
buff, int len)
{
{
- return ~do_csum(buff,len);
+ return
(__force __sum16)
~do_csum(buff,len);
}
/*
* computes a partial checksum, e.g. for TCP/UDP fragments
*/
}
/*
* computes a partial checksum, e.g. for TCP/UDP fragments
*/
-
unsigned int csum_partial(const unsigned char *buff, int len, unsigned int
sum)
+
__wsum csum_partial(const void *buff, int len, __wsum
sum)
{
unsigned int result = do_csum(buff, len);
/* add in old sum, and carry.. */
{
unsigned int result = do_csum(buff, len);
/* add in old sum, and carry.. */
- result += sum;
- if
(
sum > result)
+ result +=
(__force u32)
sum;
+ if
((__force u32)
sum > result)
result += 1;
result += 1;
- return result;
+ return
(__force __wsum)
result;
}
EXPORT_SYMBOL(csum_partial);
}
EXPORT_SYMBOL(csum_partial);
@@
-121,8
+121,8
@@
EXPORT_SYMBOL(csum_partial);
/*
* copy while checksumming, otherwise like csum_partial
*/
/*
* copy while checksumming, otherwise like csum_partial
*/
-
unsigned int csum_partial_copy(const unsigned char *src, unsigned char
*dst,
- int len,
unsigned int
sum)
+
__wsum csum_partial_copy_nocheck(const void *src, void
*dst,
+ int len,
__wsum
sum)
{
/*
* It's 2:30 am and I don't feel like doing it real ...
{
/*
* It's 2:30 am and I don't feel like doing it real ...
@@
-138,9
+138,9
@@
unsigned int csum_partial_copy(const unsigned char *src, unsigned char *dst,
* Copy from userspace and compute checksum. If we catch an exception
* then zero the rest of the buffer.
*/
* Copy from userspace and compute checksum. If we catch an exception
* then zero the rest of the buffer.
*/
-
unsigned int csum_partial_copy_from_user (const unsigned char
*src,
-
unsigned char
*dst,
- int len,
unsigned int
sum,
+
__wsum csum_partial_copy_from_user (const void
*src,
+
void
*dst,
+ int len,
__wsum
sum,
int *err_ptr)
{
int missing;
int *err_ptr)
{
int missing;