Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20200402065106.20108-1-yanaijie@huawei.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

authored by

Jason Yan and committed by
Michael S. Tsirkin
e373f3d7 aa21c2e7

-3
-3
drivers/vhost/vdpa.c
··· 296 296 struct vdpa_callback cb; 297 297 struct vhost_virtqueue *vq; 298 298 struct vhost_vring_state s; 299 - u8 status; 300 299 u32 idx; 301 300 long r; 302 301 ··· 308 309 309 310 idx = array_index_nospec(idx, v->nvqs); 310 311 vq = &v->vqs[idx]; 311 - 312 - status = ops->get_status(vdpa); 313 312 314 313 if (cmd == VHOST_VDPA_SET_VRING_ENABLE) { 315 314 if (copy_from_user(&s, argp, sizeof(s)))