Commit e373f3d7 authored by Jason Yan's avatar Jason Yan Committed by Michael S. Tsirkin

vhost: remove set but not used variable 'status'

Fix the following gcc warning:
drivers/vhost/vdpa.c:299:5: warning: variable 'status' set but not used [-Wunused-but-set-variable]
  u8 status;
     ^~~~~~
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20200402065106.20108-1-yanaijie@huawei.comSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent aa21c2e7
...@@ -296,7 +296,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, ...@@ -296,7 +296,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
struct vdpa_callback cb; struct vdpa_callback cb;
struct vhost_virtqueue *vq; struct vhost_virtqueue *vq;
struct vhost_vring_state s; struct vhost_vring_state s;
u8 status;
u32 idx; u32 idx;
long r; long r;
...@@ -310,8 +309,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, ...@@ -310,8 +309,6 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,
idx = array_index_nospec(idx, v->nvqs); idx = array_index_nospec(idx, v->nvqs);
vq = &v->vqs[idx]; vq = &v->vqs[idx];
status = ops->get_status(vdpa);
if (cmd == VHOST_VDPA_SET_VRING_ENABLE) { if (cmd == VHOST_VDPA_SET_VRING_ENABLE) {
if (copy_from_user(&s, argp, sizeof(s))) if (copy_from_user(&s, argp, sizeof(s)))
return -EFAULT; return -EFAULT;
......
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