aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi/virtio-scsi.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-11-16 19:40:36 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2021-02-25 14:14:32 +0100
commit17ea26c2d80a695b4d3af9ae2eaa438095029773 (patch)
treee771a7d7468347641ae40eb0262deaeebc950fdb /hw/scsi/virtio-scsi.c
parent782a78c9e994c2be23467262f50e885a0eb0d9fc (diff)
scsi: drop 'result' argument from command_complete callback
The command complete callback has a SCSIRequest as the first argument, and the status field of that structure is identical to the 'status' argument. So drop the argument from the callback. Signed-off-by: Hannes Reinecke <hare@suse.de> Message-Id: <20201116184041.60465-3-hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/virtio-scsi.c')
-rw-r--r--hw/scsi/virtio-scsi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 99ff261cea..358c0e70b0 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -500,8 +500,7 @@ static void virtio_scsi_complete_cmd_req(VirtIOSCSIReq *req)
virtio_scsi_complete_req(req);
}
-static void virtio_scsi_command_complete(SCSIRequest *r, uint32_t status,
- size_t resid)
+static void virtio_scsi_command_complete(SCSIRequest *r, size_t resid)
{
VirtIOSCSIReq *req = r->hba_private;
uint8_t sense[SCSI_SENSE_BUF_SIZE];
@@ -513,7 +512,7 @@ static void virtio_scsi_command_complete(SCSIRequest *r, uint32_t status,
}
req->resp.cmd.response = VIRTIO_SCSI_S_OK;
- req->resp.cmd.status = status;
+ req->resp.cmd.status = r->status;
if (req->resp.cmd.status == GOOD) {
req->resp.cmd.resid = virtio_tswap32(vdev, resid);
} else {