Message ID | 20170713110237.6712-8-lprosek@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 13 Jul 2017 13:02:36 +0200 Ladi Prosek <lprosek@redhat.com> wrote: > virtqueue_error includes queue index in the error output and is preferred > for errors that pertain to a virtqueue rather than to the device as a whole. > > Signed-off-by: Ladi Prosek <lprosek@redhat.com> > --- > hw/scsi/virtio-scsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c > index d076fe7..a633d51 100644 > --- a/hw/scsi/virtio-scsi.c > +++ b/hw/scsi/virtio-scsi.c > @@ -84,7 +84,7 @@ static void virtio_scsi_complete_req(VirtIOSCSIReq *req) > > static void virtio_scsi_bad_req(VirtIOSCSIReq *req) > { > - virtio_error(VIRTIO_DEVICE(req->dev), "wrong size for virtio-scsi headers"); > + virtqueue_error(req->vq, "wrong size for virtio-scsi headers"); > virtqueue_detach_element(req->vq, &req->elem, 0); > virtio_scsi_free_req(req); > } Reviewed-by: Cornelia Huck <cohuck@redhat.com>
On Thu, Jul 13, 2017 at 01:02:36PM +0200, Ladi Prosek wrote: > virtqueue_error includes queue index in the error output and is preferred > for errors that pertain to a virtqueue rather than to the device as a whole. > > Signed-off-by: Ladi Prosek <lprosek@redhat.com> > --- > hw/scsi/virtio-scsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index d076fe7..a633d51 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -84,7 +84,7 @@ static void virtio_scsi_complete_req(VirtIOSCSIReq *req) static void virtio_scsi_bad_req(VirtIOSCSIReq *req) { - virtio_error(VIRTIO_DEVICE(req->dev), "wrong size for virtio-scsi headers"); + virtqueue_error(req->vq, "wrong size for virtio-scsi headers"); virtqueue_detach_element(req->vq, &req->elem, 0); virtio_scsi_free_req(req); }
virtqueue_error includes queue index in the error output and is preferred for errors that pertain to a virtqueue rather than to the device as a whole. Signed-off-by: Ladi Prosek <lprosek@redhat.com> --- hw/scsi/virtio-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)