[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFF5B0B@AcuExch.aculab.com>
Date: Mon, 15 May 2017 14:25:40 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Alex Williamson' <alex.williamson@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>
CC: Maciek Fijalkowski <macfij7@...pl>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"virtualization@...ts.linux-foundation.org"
<virtualization@...ts.linux-foundation.org>
Subject: RE: [PATCH 1/3] Fix ERROR: trailing statements should be on next
line
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
Powered by blists - more mailing lists