Commit d2f8825a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio fixes from Michael Tsirkin:
 "Fix a couple of build warnings"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vhost: missing __user tags
  vdpasim: remove unused variable 'ret'
parents cedd54f7 1b0be99f
...@@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev) ...@@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev)
static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx) static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx)
{ {
struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx]; struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx];
int ret;
ret = vringh_init_iotlb(&vq->vring, vdpasim_features, vringh_init_iotlb(&vq->vring, vdpasim_features,
VDPASIM_QUEUE_MAX, false, VDPASIM_QUEUE_MAX, false,
(struct vring_desc *)(uintptr_t)vq->desc_addr, (struct vring_desc *)(uintptr_t)vq->desc_addr,
(struct vring_avail *) (struct vring_avail *)
(uintptr_t)vq->driver_addr, (uintptr_t)vq->driver_addr,
(struct vring_used *) (struct vring_used *)
(uintptr_t)vq->device_addr); (uintptr_t)vq->device_addr);
} }
static void vdpasim_vq_reset(struct vdpasim_virtqueue *vq) static void vdpasim_vq_reset(struct vdpasim_virtqueue *vq)
......
...@@ -730,7 +730,7 @@ static inline void __user *vhost_vq_meta_fetch(struct vhost_virtqueue *vq, ...@@ -730,7 +730,7 @@ static inline void __user *vhost_vq_meta_fetch(struct vhost_virtqueue *vq,
if (!map) if (!map)
return NULL; return NULL;
return (void *)(uintptr_t)(map->addr + addr - map->start); return (void __user *)(uintptr_t)(map->addr + addr - map->start);
} }
/* Can we switch to this memory table? */ /* Can we switch to this memory table? */
...@@ -869,7 +869,7 @@ static void __user *__vhost_get_user_slow(struct vhost_virtqueue *vq, ...@@ -869,7 +869,7 @@ static void __user *__vhost_get_user_slow(struct vhost_virtqueue *vq,
* not happen in this case. * not happen in this case.
*/ */
static inline void __user *__vhost_get_user(struct vhost_virtqueue *vq, static inline void __user *__vhost_get_user(struct vhost_virtqueue *vq,
void *addr, unsigned int size, void __user *addr, unsigned int size,
int type) int type)
{ {
void __user *uaddr = vhost_vq_meta_fetch(vq, void __user *uaddr = vhost_vq_meta_fetch(vq,
......
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