X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fcore%2Fiovec.c;h=755c37fdaee799c734962a1739dafdbb71882ff5;hb=d8ac48d4cbae0cc59b7784399292fbda3e231be3;hp=65e4b56fbc774cb7b605065f8cac65c7006dbbe4;hpb=ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672;p=linux-2.6-omap-h63xx.git diff --git a/net/core/iovec.c b/net/core/iovec.c index 65e4b56fbc7..755c37fdaee 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -40,7 +39,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode) { int size, err, ct; - + if (m->msg_namelen) { if (mode == VERIFY_READ) { err = move_addr_to_kernel(m->msg_name, m->msg_namelen, @@ -79,7 +78,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode) * * Note: this modifies the original iovec. */ - + int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len) { while (len > 0) { @@ -103,7 +102,7 @@ int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len) * * Note: this modifies the original iovec. */ - + int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len) { while (len > 0) { @@ -158,9 +157,9 @@ int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov, int offset, * call to this function will be unaligned also. */ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov, - int offset, unsigned int len, int *csump) + int offset, unsigned int len, __wsum *csump) { - int csum = *csump; + __wsum csum = *csump; int partial_cnt = 0, err = 0; /* Skip over the finished iovecs */ @@ -209,7 +208,7 @@ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov, if (partial_cnt) { copy -= partial_cnt; if (copy_from_user(kdata + copy, base + copy, - partial_cnt)) + partial_cnt)) goto out_fault; } } @@ -224,7 +223,7 @@ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov, kdata += copy + partial_cnt; iov++; } - *csump = csum; + *csump = csum; out: return err;