Skip to content

Commit d2f8825

Browse files
committed
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'
2 parents cedd54f + 1b0be99 commit d2f8825

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

drivers/vdpa/vdpa_sim/vdpa_sim.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,14 @@ static struct vdpasim *dev_to_sim(struct device *dev)
8989
static void vdpasim_queue_ready(struct vdpasim *vdpasim, unsigned int idx)
9090
{
9191
struct vdpasim_virtqueue *vq = &vdpasim->vqs[idx];
92-
int ret;
9392

94-
ret = vringh_init_iotlb(&vq->vring, vdpasim_features,
95-
VDPASIM_QUEUE_MAX, false,
96-
(struct vring_desc *)(uintptr_t)vq->desc_addr,
97-
(struct vring_avail *)
98-
(uintptr_t)vq->driver_addr,
99-
(struct vring_used *)
100-
(uintptr_t)vq->device_addr);
93+
vringh_init_iotlb(&vq->vring, vdpasim_features,
94+
VDPASIM_QUEUE_MAX, false,
95+
(struct vring_desc *)(uintptr_t)vq->desc_addr,
96+
(struct vring_avail *)
97+
(uintptr_t)vq->driver_addr,
98+
(struct vring_used *)
99+
(uintptr_t)vq->device_addr);
101100
}
102101

103102
static void vdpasim_vq_reset(struct vdpasim_virtqueue *vq)

drivers/vhost/vhost.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ static inline void __user *vhost_vq_meta_fetch(struct vhost_virtqueue *vq,
730730
if (!map)
731731
return NULL;
732732

733-
return (void *)(uintptr_t)(map->addr + addr - map->start);
733+
return (void __user *)(uintptr_t)(map->addr + addr - map->start);
734734
}
735735

736736
/* Can we switch to this memory table? */
@@ -869,7 +869,7 @@ static void __user *__vhost_get_user_slow(struct vhost_virtqueue *vq,
869869
* not happen in this case.
870870
*/
871871
static inline void __user *__vhost_get_user(struct vhost_virtqueue *vq,
872-
void *addr, unsigned int size,
872+
void __user *addr, unsigned int size,
873873
int type)
874874
{
875875
void __user *uaddr = vhost_vq_meta_fetch(vq,

0 commit comments

Comments
 (0)