From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965506AbdEOOZw convert rfc822-to-8bit (ORCPT ); Mon, 15 May 2017 10:25:52 -0400 Received: from smtp-out6.electric.net ([192.162.217.195]:57321 "EHLO smtp-out6.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933430AbdEOOZr (ORCPT ); Mon, 15 May 2017 10:25:47 -0400 From: David Laight To: "'Alex Williamson'" , "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 Thread-Topic: [PATCH 1/3] Fix ERROR: trailing statements should be on next line Thread-Index: AQHSzNu3v2LxZtb4XEmqOcsRJsIChqH0o6qAgAAGWQCAAMmtAA== Date: Mon, 15 May 2017 14:25:40 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFF5B0B@AcuExch.aculab.com> References: <20170514175130.18664-1-macfij7@wp.pl> <20170515055700-mutt-send-email-mst@kernel.org> <20170514212048.24ee7667@t450s.home> In-Reply-To: <20170514212048.24ee7667@t450s.home> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Outbound-IP: 156.67.243.126 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Williamson > Sent: 15 May 2017 04:21 ... > > > /* 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, My preference is to put 'continue;' on a line by itself. Or even move the termination condition into the loop: for (end = page;; end = (struct page *)end->private) if (!end->private) break; (oh, is that cast needed??) David