diff mbox series

[v8,1/3] vdpa: delete unreachable branch on vdpasim_suspend

Message ID 20220811135353.2549658-2-eperezma@redhat.com (mailing list archive)
State Not Applicable
Headers show
Series Implement vdpasim suspend operation | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Eugenio Perez Martin Aug. 11, 2022, 1:53 p.m. UTC
It was a leftover from previous versions.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Jason Wang Aug. 19, 2022, 12:55 a.m. UTC | #1
On Thu, Aug 11, 2022 at 9:54 PM Eugenio Pérez <eperezma@redhat.com> wrote:
>
> It was a leftover from previous versions.
>
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>

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

> ---
>  drivers/vdpa/vdpa_sim/vdpa_sim.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> index 213883487f9b..79a50edf8998 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> @@ -509,16 +509,9 @@ static int vdpasim_reset(struct vdpa_device *vdpa)
>  static int vdpasim_suspend(struct vdpa_device *vdpa)
>  {
>         struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
> -       int i;
>
>         spin_lock(&vdpasim->lock);
>         vdpasim->running = false;
> -       if (vdpasim->running) {
> -               /* Check for missed buffers */
> -               for (i = 0; i < vdpasim->dev_attr.nvqs; ++i)
> -                       vdpasim_kick_vq(vdpa, i);
> -
> -       }
>         spin_unlock(&vdpasim->lock);
>
>         return 0;
> --
> 2.31.1
>
diff mbox series

Patch

diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
index 213883487f9b..79a50edf8998 100644
--- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
+++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
@@ -509,16 +509,9 @@  static int vdpasim_reset(struct vdpa_device *vdpa)
 static int vdpasim_suspend(struct vdpa_device *vdpa)
 {
 	struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
-	int i;
 
 	spin_lock(&vdpasim->lock);
 	vdpasim->running = false;
-	if (vdpasim->running) {
-		/* Check for missed buffers */
-		for (i = 0; i < vdpasim->dev_attr.nvqs; ++i)
-			vdpasim_kick_vq(vdpa, i);
-
-	}
 	spin_unlock(&vdpasim->lock);
 
 	return 0;