diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-24 19:45:05 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-09 16:29:11 -0500 |
| commit | 218321e7a0838c2be974539f0a5341b398d4432b (patch) | |
| tree | f2b6606ee509292bfb98d7427a21f9882b6a945e | |
| parent | d3a9632f09153bc46a8077844e05e179f1c10c3f (diff) | |
bury memcpy_toiovec()
no users left
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| -rw-r--r-- | include/linux/uio.h | 1 | ||||
| -rw-r--r-- | lib/iovec.c | 25 |
2 files changed, 0 insertions, 26 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index bd8569a14c4a..a41e252396c0 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
| @@ -131,7 +131,6 @@ size_t csum_and_copy_to_iter(void *addr, size_t bytes, __wsum *csum, struct iov_ | |||
| 131 | size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); | 131 | size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); |
| 132 | 132 | ||
| 133 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); | 133 | int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); |
| 134 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); | ||
| 135 | int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, | 134 | int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, |
| 136 | int offset, int len); | 135 | int offset, int len); |
| 137 | int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, | 136 | int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, |
diff --git a/lib/iovec.c b/lib/iovec.c index df3abd1eaa4a..2d99cb4a5006 100644 --- a/lib/iovec.c +++ b/lib/iovec.c | |||
| @@ -29,31 +29,6 @@ EXPORT_SYMBOL(memcpy_fromiovec); | |||
| 29 | 29 | ||
| 30 | /* | 30 | /* |
| 31 | * Copy kernel to iovec. Returns -EFAULT on error. | 31 | * Copy kernel to iovec. Returns -EFAULT on error. |
| 32 | * | ||
| 33 | * Note: this modifies the original iovec. | ||
| 34 | */ | ||
| 35 | |||
| 36 | int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len) | ||
| 37 | { | ||
| 38 | while (len > 0) { | ||
| 39 | if (iov->iov_len) { | ||
| 40 | int copy = min_t(unsigned int, iov->iov_len, len); | ||
| 41 | if (copy_to_user(iov->iov_base, kdata, copy)) | ||
| 42 | return -EFAULT; | ||
| 43 | kdata += copy; | ||
| 44 | len -= copy; | ||
| 45 | iov->iov_len -= copy; | ||
| 46 | iov->iov_base += copy; | ||
| 47 | } | ||
| 48 | iov++; | ||
| 49 | } | ||
| 50 | |||
| 51 | return 0; | ||
| 52 | } | ||
| 53 | EXPORT_SYMBOL(memcpy_toiovec); | ||
| 54 | |||
| 55 | /* | ||
| 56 | * Copy kernel to iovec. Returns -EFAULT on error. | ||
| 57 | */ | 32 | */ |
| 58 | 33 | ||
| 59 | int memcpy_toiovecend(const struct iovec *iov, unsigned char *kdata, | 34 | int memcpy_toiovecend(const struct iovec *iov, unsigned char *kdata, |
