summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-01-13 13:30:32 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-13 17:14:15 -0600
commit4277906d281e7fd04817782777b90f6d122f4443 (patch)
tree05a14f137e5da3608c7a5b44dca1a3b8292fe1a8 /hw
parentf8012c135ecb0f410245b3ed0476a5d0a61beb9c (diff)
virtio-blk: remove dead variable in virtio_blk_handle_scsi
As pointed out by clang size is only ever written to, but never actually used. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/virtio-blk.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index cb1ae1f953..865352a160 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -165,7 +165,7 @@ static VirtIOBlockReq *virtio_blk_get_request(VirtIOBlock *s)
static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
{
struct sg_io_hdr hdr;
- int ret, size = 0;
+ int ret;
int status;
int i;
@@ -194,7 +194,6 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
* before the regular inhdr.
*/
req->scsi = (void *)req->elem.in_sg[req->elem.in_num - 2].iov_base;
- size = sizeof(*req->in) + sizeof(*req->scsi);
memset(&hdr, 0, sizeof(struct sg_io_hdr));
hdr.interface_id = 'S';
@@ -226,7 +225,6 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
hdr.dxfer_len += req->elem.in_sg[i].iov_len;
hdr.dxferp = req->elem.in_sg;
- size += hdr.dxfer_len;
} else {
/*
* Some SCSI commands don't actually transfer any data.
@@ -236,7 +234,6 @@ static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
hdr.sbp = req->elem.in_sg[req->elem.in_num - 3].iov_base;
hdr.mx_sb_len = req->elem.in_sg[req->elem.in_num - 3].iov_len;
- size += hdr.mx_sb_len;
ret = bdrv_ioctl(req->dev->bs, SG_IO, &hdr);
if (ret) {