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
commit42741212ebe703a5b9273475e7c65829b8fa2e51 (patch)
tree6e8c42138846f8aac2474b4ac6333642f2eb560e /hw/scsi-generic.c
parentefb9ee024845982a210bfe48a73298846adfe9da (diff)
downloadqemu-42741212ebe703a5b9273475e7c65829b8fa2e51.tar.gz
qemu-42741212ebe703a5b9273475e7c65829b8fa2e51.tar.bz2
qemu-42741212ebe703a5b9273475e7c65829b8fa2e51.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. */