linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vhost: remove avail_event arg from vhost_update_avail_event()
@ 2022-01-13 14:11 Stefano Garzarella
  2022-01-14  6:12 ` Jason Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Garzarella @ 2022-01-13 14:11 UTC (permalink / raw)
  To: virtualization; +Cc: linux-kernel, Jason Wang, kvm, Michael S. Tsirkin, netdev

In vhost_update_avail_event() we never used the `avail_event` argument,
since its introduction in commit 2723feaa8ec6 ("vhost: set log when
updating used flags or avail event").

Let's remove it to clean up the code.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
 drivers/vhost/vhost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 59edb5a1ffe2..ee171e663a18 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -1981,7 +1981,7 @@ static int vhost_update_used_flags(struct vhost_virtqueue *vq)
 	return 0;
 }
 
-static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event)
+static int vhost_update_avail_event(struct vhost_virtqueue *vq)
 {
 	if (vhost_put_avail_event(vq))
 		return -EFAULT;
@@ -2527,7 +2527,7 @@ bool vhost_enable_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq)
 			return false;
 		}
 	} else {
-		r = vhost_update_avail_event(vq, vq->avail_idx);
+		r = vhost_update_avail_event(vq);
 		if (r) {
 			vq_err(vq, "Failed to update avail event index at %p: %d\n",
 			       vhost_avail_event(vq), r);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] vhost: remove avail_event arg from vhost_update_avail_event()
  2022-01-13 14:11 [PATCH] vhost: remove avail_event arg from vhost_update_avail_event() Stefano Garzarella
@ 2022-01-14  6:12 ` Jason Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Wang @ 2022-01-14  6:12 UTC (permalink / raw)
  To: Stefano Garzarella
  Cc: virtualization, linux-kernel, kvm, Michael S. Tsirkin, netdev

On Thu, Jan 13, 2022 at 10:11 PM Stefano Garzarella <sgarzare@redhat.com> wrote:
>
> In vhost_update_avail_event() we never used the `avail_event` argument,
> since its introduction in commit 2723feaa8ec6 ("vhost: set log when
> updating used flags or avail event").
>
> Let's remove it to clean up the code.
>
> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>

Acked-by: Jason Wang <jasowang@redhat.com>

> ---
>  drivers/vhost/vhost.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
> index 59edb5a1ffe2..ee171e663a18 100644
> --- a/drivers/vhost/vhost.c
> +++ b/drivers/vhost/vhost.c
> @@ -1981,7 +1981,7 @@ static int vhost_update_used_flags(struct vhost_virtqueue *vq)
>         return 0;
>  }
>
> -static int vhost_update_avail_event(struct vhost_virtqueue *vq, u16 avail_event)
> +static int vhost_update_avail_event(struct vhost_virtqueue *vq)
>  {
>         if (vhost_put_avail_event(vq))
>                 return -EFAULT;
> @@ -2527,7 +2527,7 @@ bool vhost_enable_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq)
>                         return false;
>                 }
>         } else {
> -               r = vhost_update_avail_event(vq, vq->avail_idx);
> +               r = vhost_update_avail_event(vq);
>                 if (r) {
>                         vq_err(vq, "Failed to update avail event index at %p: %d\n",
>                                vhost_avail_event(vq), r);
> --
> 2.31.1
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-14  6:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 14:11 [PATCH] vhost: remove avail_event arg from vhost_update_avail_event() Stefano Garzarella
2022-01-14  6:12 ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).