From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754760AbdEODU4 (ORCPT ); Sun, 14 May 2017 23:20:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44218 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751536AbdEODUy (ORCPT ); Sun, 14 May 2017 23:20:54 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EC86D3DBD8 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=alex.williamson@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EC86D3DBD8 Date: Sun, 14 May 2017 21:20:48 -0600 From: Alex Williamson To: "Michael S. Tsirkin" Cc: Maciek Fijalkowski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH 1/3] Fix ERROR: trailing statements should be on next line Message-ID: <20170514212048.24ee7667@t450s.home> In-Reply-To: <20170515055700-mutt-send-email-mst@kernel.org> References: <20170514175130.18664-1-macfij7@wp.pl> <20170515055700-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 15 May 2017 03:20:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 May 2017 05:58:05 +0300 "Michael S. Tsirkin" wrote: > On Sun, May 14, 2017 at 07:51:28PM +0200, Maciek Fijalkowski wrote: > > From: Maciej Fijalkowski > > > > Signed-off-by: Maciej Fijalkowski > > I prefer the original form - ; isn't a full statement. > > > --- > > drivers/net/virtio_net.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 9320d96..f20dfb8 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -217,7 +217,8 @@ static void give_pages(struct receive_queue *rq, struct page *page) > > struct page *end; > > > > /* Find end of list, sew whole thing into vi->rq.pages. */ > > - for (end = page; end->private; end = (struct page *)end->private); > > + for (end = page; end->private; end = (struct page *)end->private) > > + ; FWIW, I generally like to put a comment on the next line to make it abundantly clear that there's nothing in the body of the loop, it's also more aesthetically pleasing than a semi-colon on the line by itself, ex. /* Nothing */; It's just too easy to misinterpret the loop otherwise, especially without gratuitous white space. Thanks, Alex > > end->private = (unsigned long)rq->pages; > > rq->pages = page; > > } > > -- > > 2.4.11 > _______________________________________________ > Virtualization mailing list > Virtualization@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/virtualization