From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49877 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PKeFh-00077d-1C for qemu-devel@nongnu.org; Mon, 22 Nov 2010 16:48:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PKeFf-0006fu-Py for qemu-devel@nongnu.org; Mon, 22 Nov 2010 16:48:44 -0500 Received: from mail-ww0-f47.google.com ([74.125.82.47]:45935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PKeFf-0006fj-Le for qemu-devel@nongnu.org; Mon, 22 Nov 2010 16:48:43 -0500 Received: by wwb13 with SMTP id 13so164336wwb.4 for ; Mon, 22 Nov 2010 13:48:42 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20101122101536.2B09BF90AF@ochil.suse.de> References: <20101122101536.2B09BF90AF@ochil.suse.de> Date: Mon, 22 Nov 2010 21:48:42 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH] scsi: Implement alloc_req_iov callback List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: qemu-devel@nongnu.org, nab@linux-iscsi.org, kraxel@redhat.com On Mon, Nov 22, 2010 at 10:15 AM, Hannes Reinecke wrote: Looks good. If you send out another version of the patchset you might like to fix this nitpick: > + =A0 =A0if (!r->io_header.iovec_count) { > + =A0 =A0 =A0 =A0if (r->buflen !=3D r->req.cmd.xfer) { > + =A0 =A0 =A0 =A0 =A0 =A0if (r->buf !=3D NULL) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0qemu_free(r->buf); qemu_free(NULL) is a nop so it's safe to drop the if (r->buf !=3D NULL) check and just use qemu_free(r->buf) unconditionally. That's nice since it also fixes the if statement without curly braces. Stefan