summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/vringh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vhost/vringh.c')
-rw-r--r--drivers/vhost/vringh.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index 08ad0d1f0476..a0a2d74967ef 100644
--- a/drivers/vhost/vringh.c
+++ b/drivers/vhost/vringh.c
@@ -852,6 +852,12 @@ static inline int xfer_kern(void *src, void *dst, size_t len)
852 return 0; 852 return 0;
853} 853}
854 854
855static inline int kern_xfer(void *dst, void *src, size_t len)
856{
857 memcpy(dst, src, len);
858 return 0;
859}
860
855/** 861/**
856 * vringh_init_kern - initialize a vringh for a kernelspace vring. 862 * vringh_init_kern - initialize a vringh for a kernelspace vring.
857 * @vrh: the vringh to initialize. 863 * @vrh: the vringh to initialize.
@@ -958,7 +964,7 @@ EXPORT_SYMBOL(vringh_iov_pull_kern);
958ssize_t vringh_iov_push_kern(struct vringh_kiov *wiov, 964ssize_t vringh_iov_push_kern(struct vringh_kiov *wiov,
959 const void *src, size_t len) 965 const void *src, size_t len)
960{ 966{
961 return vringh_iov_xfer(wiov, (void *)src, len, xfer_kern); 967 return vringh_iov_xfer(wiov, (void *)src, len, kern_xfer);
962} 968}
963EXPORT_SYMBOL(vringh_iov_push_kern); 969EXPORT_SYMBOL(vringh_iov_push_kern);
964 970