From: Peter Lieven <pl@kamp.de>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, Peter Lieven <pl@kamp.de>,
stefanha@redhat.com
Subject: [Qemu-devel] [PATCH] block/iscsi: drop obsolete pointers from iscsi_co_writev
Date: Wed, 18 Jun 2014 18:40:22 +0200 [thread overview]
Message-ID: <1403109622-12338-1-git-send-email-pl@kamp.de> (raw)
Signed-off-by: Peter Lieven <pl@kamp.de>
---
block/iscsi.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 327353c..84aa22a 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -359,8 +359,6 @@ static int coroutine_fn iscsi_co_writev(BlockDriverState *bs,
struct IscsiTask iTask;
uint64_t lba;
uint32_t num_sectors;
- uint8_t *data = NULL;
- uint8_t *buf = NULL;
if (!is_request_lun_aligned(sector_num, nb_sectors, iscsilun)) {
return -EINVAL;
@@ -372,17 +370,16 @@ static int coroutine_fn iscsi_co_writev(BlockDriverState *bs,
retry:
if (iscsilun->use_16_for_rw) {
iTask.task = iscsi_write16_task(iscsilun->iscsi, iscsilun->lun, lba,
- data, num_sectors * iscsilun->block_size,
+ NULL, num_sectors * iscsilun->block_size,
iscsilun->block_size, 0, 0, 0, 0, 0,
iscsi_co_generic_cb, &iTask);
} else {
iTask.task = iscsi_write10_task(iscsilun->iscsi, iscsilun->lun, lba,
- data, num_sectors * iscsilun->block_size,
+ NULL, num_sectors * iscsilun->block_size,
iscsilun->block_size, 0, 0, 0, 0, 0,
iscsi_co_generic_cb, &iTask);
}
if (iTask.task == NULL) {
- g_free(buf);
return -ENOMEM;
}
scsi_task_set_iov_out(iTask.task, (struct scsi_iovec *) iov->iov,
@@ -402,8 +399,6 @@ retry:
goto retry;
}
- g_free(buf);
-
if (iTask.status != SCSI_STATUS_GOOD) {
return -EIO;
}
--
1.7.9.5
next reply other threads:[~2014-06-18 16:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 16:40 Peter Lieven [this message]
2014-06-23 8:06 ` [Qemu-devel] [PATCH] block/iscsi: drop obsolete pointers from iscsi_co_writev Stefan Hajnoczi
2014-06-23 8:13 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403109622-12338-1-git-send-email-pl@kamp.de \
--to=pl@kamp.de \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).