mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
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>
This commit is contained in:
parent
782a78c9e9
commit
17ea26c2d8
13 changed files with 32 additions and 37 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue