Commit bb791829 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

net/iovec: drop useless kernel<-> iovec[] copy helpers

No more in-tree users for those, in the wake of dropping the broken
direct references from the kernel to user-space memory.
parent f6f97291
......@@ -28,24 +28,6 @@
struct user_msghdr;
struct rtdm_fd;
/***
* rt_iovec_len
*/
static inline size_t rt_iovec_len(const struct iovec *iov, int iovlen)
{
int i;
size_t len = 0;
for (i = 0; i < iovlen; i++)
len += iov[i].iov_len;
return len;
}
extern void rt_memcpy_tokerneliovec(struct iovec *iov, unsigned char *kdata, int len);
extern void rt_memcpy_fromkerneliovec(unsigned char *kdata, struct iovec *iov, int len);
ssize_t rtnet_write_to_iov(struct rtdm_fd *fd,
struct iovec *iov, int iovlen,
const void *data, size_t len);
......
......@@ -29,52 +29,6 @@
#include <rtnet_iovec.h>
#include <rtnet_socket.h>
/***
* rt_memcpy_tokerneliovec
*/
void rt_memcpy_tokerneliovec(struct iovec *iov, unsigned char *kdata, int len)
{
while (len > 0)
{
if (iov->iov_len)
{
int copy = min_t(unsigned int, iov->iov_len, len);
memcpy(iov->iov_base, kdata, copy);
kdata+=copy;
len-=copy;
iov->iov_len-=copy;
iov->iov_base+=copy;
}
iov++;
}
}
EXPORT_SYMBOL_GPL(rt_memcpy_tokerneliovec);
/***
* rt_memcpy_fromkerneliovec
*/
void rt_memcpy_fromkerneliovec(unsigned char *kdata, struct iovec *iov,int len)
{
while (len > 0)
{
if (iov->iov_len)
{
int copy=min_t(unsigned int, len, iov->iov_len);
memcpy(kdata, iov->iov_base, copy);
len-=copy;
kdata+=copy;
iov->iov_base+=copy;
iov->iov_len-=copy;
}
iov++;
}
}
EXPORT_SYMBOL_GPL(rt_memcpy_fromkerneliovec);
ssize_t rtnet_write_to_iov(struct rtdm_fd *fd,
struct iovec *iov, int iovlen,
const void *data, size_t len)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment