diff mbox series

virtio_scsi: remove duplicate check if queue is broken

Message ID 20240116045836.12475-1-lirongqing@baidu.com
State New
Headers show
Series virtio_scsi: remove duplicate check if queue is broken | expand

Commit Message

Li RongQing Jan. 16, 2024, 4:58 a.m. UTC
virtqueue_enable_cb() will call virtqueue_poll() which will check if
queue is broken at beginning, so remove the virtqueue_is_broken() call

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 drivers/scsi/virtio_scsi.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Stefan Hajnoczi Jan. 16, 2024, 1:02 p.m. UTC | #1
On Tue, 16 Jan 2024 at 00:07, Li RongQing <lirongqing@baidu.com> wrote:
>
> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call
>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
> ---
>  drivers/scsi/virtio_scsi.c | 2 --
>  1 file changed, 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 9d1bdcd..e15b380 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -182,8 +182,6 @@ static void virtscsi_vq_done(struct virtio_scsi *vscsi,
>                 while ((buf = virtqueue_get_buf(vq, &len)) != NULL)
>                         fn(vscsi, buf);
>
> -               if (unlikely(virtqueue_is_broken(vq)))
> -                       break;
>         } while (!virtqueue_enable_cb(vq));
>         spin_unlock_irqrestore(&virtscsi_vq->vq_lock, flags);
>  }
> --
> 2.9.4
>
>
Martin K. Petersen Jan. 17, 2024, 7:46 p.m. UTC | #2
> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call

Applied to 6.8/scsi-staging, thanks!
Martin K. Petersen Jan. 24, 2024, 3 a.m. UTC | #3
On Tue, 16 Jan 2024 12:58:36 +0800, Li RongQing wrote:

> virtqueue_enable_cb() will call virtqueue_poll() which will check if
> queue is broken at beginning, so remove the virtqueue_is_broken() call
> 
> 

Applied to 6.8/scsi-fixes, thanks!

[1/1] virtio_scsi: remove duplicate check if queue is broken
      https://git.kernel.org/mkp/scsi/c/d6b75ba52189
diff mbox series

Patch

diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 9d1bdcd..e15b380 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -182,8 +182,6 @@  static void virtscsi_vq_done(struct virtio_scsi *vscsi,
 		while ((buf = virtqueue_get_buf(vq, &len)) != NULL)
 			fn(vscsi, buf);
 
-		if (unlikely(virtqueue_is_broken(vq)))
-			break;
 	} while (!virtqueue_enable_cb(vq));
 	spin_unlock_irqrestore(&virtscsi_vq->vq_lock, flags);
 }