Module: xenomai-3 Branch: next Commit: 3eaad873fbd47186514655902ac40969a417c9f7 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=3eaad873fbd47186514655902ac40969a417c9f7
Author: Philippe Gerum <r...@xenomai.org> Date: Wed Dec 6 13:41:06 2017 +0100 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. --- kernel/drivers/net/stack/include/rtnet_iovec.h | 18 ---------- kernel/drivers/net/stack/iovec.c | 46 ------------------------ 2 files changed, 64 deletions(-) diff --git a/kernel/drivers/net/stack/include/rtnet_iovec.h b/kernel/drivers/net/stack/include/rtnet_iovec.h index 09e86d1..69113f4 100644 --- a/kernel/drivers/net/stack/include/rtnet_iovec.h +++ b/kernel/drivers/net/stack/include/rtnet_iovec.h @@ -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); diff --git a/kernel/drivers/net/stack/iovec.c b/kernel/drivers/net/stack/iovec.c index 3164d28..ac7501c 100644 --- a/kernel/drivers/net/stack/iovec.c +++ b/kernel/drivers/net/stack/iovec.c @@ -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) _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git