aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-disk.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-disk.c
parentefb9ee024845982a210bfe48a73298846adfe9da (diff)
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-disk.c')
-rw-r--r--hw/scsi-disk.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index f3eba52850..e0c384f148 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -269,7 +269,7 @@ static void scsi_write_complete(void * opaque, int ret)
}
}
-static int scsi_write_data(SCSIRequest *req)
+static void scsi_write_data(SCSIRequest *req)
{
SCSIDiskReq *r = DO_UPCAST(SCSIDiskReq, req, req);
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
@@ -281,7 +281,7 @@ static int scsi_write_data(SCSIRequest *req)
if (r->req.cmd.mode != SCSI_XFER_TO_DEV) {
DPRINTF("Data transfer direction invalid\n");
scsi_write_complete(r, -EINVAL);
- return 0;
+ return;
}
n = r->iov.iov_len / 512;
@@ -296,8 +296,6 @@ static int scsi_write_data(SCSIRequest *req)
/* Invoke completion routine to fetch data from host. */
scsi_write_complete(r, 0);
}
-
- return 0;
}
static void scsi_dma_restart_bh(void *opaque)