summaryrefslogtreecommitdiff
path: root/hw/scsi-generic.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-04-22 09:39:16 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2011-05-26 12:14:17 +0200
commitf0a12696fd516a4b8efe0d10175650f9011e5634 (patch)
tree6e8c42138846f8aac2474b4ac6333642f2eb560e /hw/scsi-generic.c
parent85539e1f609125c8673b295e3c7f35868fbf31b9 (diff)
downloadqemu-f0a12696fd516a4b8efe0d10175650f9011e5634.tar.gz
qemu-f0a12696fd516a4b8efe0d10175650f9011e5634.tar.bz2
qemu-f0a12696fd516a4b8efe0d10175650f9011e5634.zip
scsi: make write_data return void
The return value is unused anyway. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'hw/scsi-generic.c')
-rw-r--r--hw/scsi-generic.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index fc015e0755..579bab9e7c 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -277,7 +277,7 @@ static void scsi_write_complete(void * opaque, int ret)
/* Write data to a scsi device. Returns nonzero on failure.
The transfer may complete asynchronously. */
-static int scsi_write_data(SCSIRequest *req)
+static void scsi_write_data(SCSIRequest *req)
{
SCSIGenericState *s = DO_UPCAST(SCSIGenericState, qdev, req->dev);
SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req);
@@ -287,16 +287,13 @@ static int scsi_write_data(SCSIRequest *req)
if (r->len == 0) {
r->len = r->buflen;
scsi_req_data(&r->req, r->len);
- return 0;
+ return;
}
ret = execute_command(s->bs, r, SG_DXFER_TO_DEV, scsi_write_complete);
if (ret < 0) {
scsi_command_complete(r, ret);
- return 1;
}
-
- return 0;
}
/* Return a pointer to the data buffer. */