mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Willy Tarreau' <w@1wt.eu>, Arnd Bergmann <arnd@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Jens Axboe <axboe@kernel.dk>,
	"Chaitanya Kulkarni" <chaitanya.kulkarni@wdc.com>,
	Hannes Reinecke <hare@suse.de>,
	"Bodo Stroesser" <bstroesser@ts.fujitsu.com>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Guoqing Jiang <guoqing.jiang@cloud.ionos.com>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	"target-devel@vger.kernel.org" <target-devel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] target: pscsi: avoid Wempty-body warning
Date: Tue, 23 Mar 2021 17:24:09 +0000	[thread overview]
Message-ID: <9f16a764ac564866b6ba6fad4c00b67a@AcuMS.aculab.com> (raw)
In-Reply-To: <20210322162601.GB23467@1wt.eu>

..
> I totally agree with this one but usually it's already reported by
> another one (probably the one complaining about misindenting). The
> case I've seen quite a few times was:
> 
>      while (condition);
> 
> At least I want the ';' on its own line to avoid it being
> confused with one that ends a do {} while() block.

For that one it is worth doing:
	while (condition)
		continue;

I've also managed to write:
	while (...) {
		....
	} while (...);

And if anyone thing code should be laid out as:
	do
	{
		...
	}
	while (...);
Show them:
		...
	}
	while (.......................................................
	{
		...
and ask them what it is supposed to be.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2021-03-23 17:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 11:44 Arnd Bergmann
2021-03-22 15:47 ` Christoph Hellwig
2021-03-22 15:53   ` Willy Tarreau
2021-03-22 16:18     ` Arnd Bergmann
2021-03-22 16:26       ` Willy Tarreau
2021-03-22 16:34         ` Arnd Bergmann
2021-03-22 16:38           ` Willy Tarreau
2021-03-23 17:24         ` David Laight [this message]
2021-03-22 16:06 ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9f16a764ac564866b6ba6fad4c00b67a@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=arnd@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bstroesser@ts.fujitsu.com \
    --cc=chaitanya.kulkarni@wdc.com \
    --cc=guoqing.jiang@cloud.ionos.com \
    --cc=hare@suse.de \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@vger.kernel.org \
    --cc=w@1wt.eu \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®