From 15538ba5ffaa5cbdfd11161ded503b27f5c1f0af Mon Sep 17 00:00:00 2001 From: Andrey Ryabinin Date: Tue, 17 May 2022 13:08:47 -0500 Subject: vhost_vsock: simplify vhost_vsock_flush() vhost_vsock_flush() calls vhost_work_dev_flush(vsock->vqs[i].poll.dev) before vhost_work_dev_flush(&vsock->dev). This seems pointless as vsock->vqs[i].poll.dev is the same as &vsock->dev and several flushes in a row doesn't do anything useful, one is just enough. Signed-off-by: Andrey Ryabinin Reviewed-by: Stefano Garzarella Signed-off-by: Mike Christie Acked-by: Jason Wang Message-Id: <20220517180850.198915-6-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vsock.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/vhost/vsock.c') diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index a4c8ae92a0fb..96be63697117 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -705,11 +705,6 @@ out: static void vhost_vsock_flush(struct vhost_vsock *vsock) { - int i; - - for (i = 0; i < ARRAY_SIZE(vsock->vqs); i++) - if (vsock->vqs[i].handle_kick) - vhost_work_dev_flush(vsock->vqs[i].poll.dev); vhost_work_dev_flush(&vsock->dev); } -- cgit v1.2.3