From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47994 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PR4rr-0001jS-9I for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:26:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PR4rm-00024J-BC for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:26:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:65111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PR4rm-000249-2i for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:26:38 -0500 Date: Fri, 10 Dec 2010 20:56:22 +0530 From: Amit Shah Message-ID: <20101210152622.GE15015@amit-x200.redhat.com> References: <201012101402.37690.paul@codesourcery.com> <20101210145957.GD15015@amit-x200.redhat.com> <201012101517.18342.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201012101517.18342.paul@codesourcery.com> Subject: [Qemu-devel] Re: [PATCH 4/5] virtio-serial: Don't copy over guest buffer to host List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu list On (Fri) Dec 10 2010 [15:17:18], Paul Brook wrote: > > On (Fri) Dec 10 2010 [14:02:37], Paul Brook wrote: > > > > - if (!discard) { > > > > + if (discard) { > > > > + goto next; > > > > + } > > > > > > > > + next: > > > > virtqueue_push(vq, &elem, 0); > > > > > > Please don't do this. > > > > Could you elaborate? > > > > I can move the 'discard' check into the following 'for' loop, but since > > the value of discard doesn't change, I moved it outside. > > You've replaced a perfectly good if block with a goto. To keep the indentation levels low. I've put it in the for loop for v2. Amit