Received: from eggs.gnu.org ([2001:4830:134:3::10]:50505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WClbt-0007Nn-4A for qemu-devel@nongnu.org; Mon, 10 Feb 2014 02:49:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WClbn-00041K-5E for qemu-devel@nongnu.org; Mon, 10 Feb 2014 02:48:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WClbm-00041E-SJ for qemu-devel@nongnu.org; Mon, 10 Feb 2014 02:48:51 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1A7mmbC013909 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 10 Feb 2014 02:48:48 -0500 Date: Mon, 10 Feb 2014 15:48:55 +0800 From: Fam Zheng Message-ID: <20140210074855.GG15707@T430.nay.redhat.com> References: <1391939335-31580-1-git-send-email-pbonzini@redhat.com> <1391939335-31580-6-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1391939335-31580-6-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 05/20] iscsi: fix indentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com On Sun, 02/09 10:48, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/iscsi.c | 45 +++++++++++++++++++++++---------------------- > 1 file changed, 23 insertions(+), 22 deletions(-) > > diff --git a/block/iscsi.c b/block/iscsi.c > index 6f4af72..e654a57 100644 > --- a/block/iscsi.c > +++ b/block/iscsi.c > @@ -1065,35 +1065,36 @@ static QemuOptsList runtime_opts = { > }, > }; > > -static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, > - int lun, int evpd, int pc) { > - int full_size; > - struct scsi_task *task = NULL; > - task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, 64); > +static struct scsi_task *iscsi_do_inquiry(struct iscsi_context *iscsi, int lun, > + int evpd, int pc) > +{ > + int full_size; > + struct scsi_task *task = NULL; > + task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, 64); > + if (task == NULL || task->status != SCSI_STATUS_GOOD) { > + goto fail; > + } > + full_size = scsi_datain_getfullsize(task); > + if (full_size > task->datain.size) { > + scsi_free_scsi_task(task); > + > + /* we need more data for the full list */ > + task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, full_size); > if (task == NULL || task->status != SCSI_STATUS_GOOD) { > goto fail; > } > - full_size = scsi_datain_getfullsize(task); > - if (full_size > task->datain.size) { > - scsi_free_scsi_task(task); > - > - /* we need more data for the full list */ > - task = iscsi_inquiry_sync(iscsi, lun, evpd, pc, full_size); > - if (task == NULL || task->status != SCSI_STATUS_GOOD) { > - goto fail; > - } > - } > + } > > - return task; > + return task; > > fail: > - error_report("iSCSI: Inquiry command failed : %s", > - iscsi_get_error(iscsi)); > - if (task) { > - scsi_free_scsi_task(task); > - return NULL; > - } > + error_report("iSCSI: Inquiry command failed : %s", > + iscsi_get_error(iscsi)); > + if (task) { > + scsi_free_scsi_task(task); > return NULL; > + } > + return NULL; > } > > /* > -- > 1.8.5.3 > Reviewed-by: Fam Zheng