linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Triplett <josht@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-sparse@vger.kernel.org
Subject: Re: [PATCH] CodingStyle: proscribe do-while without braces.
Date: Fri, 27 Jul 2007 11:52:10 -0700	[thread overview]
Message-ID: <1185562330.2642.13.camel@josh-work.beaverton.ibm.com> (raw)
In-Reply-To: <20070727112723.131753f9.akpm@linux-foundation.org>

On Fri, 2007-07-27 at 11:27 -0700, Andrew Morton wrote:
> On Fri, 27 Jul 2007 10:05:16 -0700
> Josh Triplett <josht@linux.vnet.ibm.com> wrote:
> 
> > > Sparse warnings... I think it shouldn't complain either, unless
> > > called with extra parameter.
> > 
> > Good point; Sparse shouldn't warn about this by default.  I've turned
> > that off in latest Sparse from Git, so you need to give -Wdo-while or
> > -Wall to get warnings about that.  However, the kernel gives -Wall, so
> > you'll still see the warnings there.
> 
> I believe reeducating sparse was the best fix here.  I think I'll now
> have a quiet accident with codingstyle-proscribe-do-while-without-braces.patch

I didn't just submit the patch because Sparse warns about it.  I
submitted the patch because of the coding style preference that led to
the Sparse warning.

Also, if this really *shouldn't* form part of the kernel style, then the
kernel should use -Wno-do-while with -Wall, or should stop using -Wall.

That said, I don't care all that much about the patch, so I won't push
further for it one way or another.

- Josh Triplett

  reply	other threads:[~2007-07-27 18:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26 21:37 [PATCH] CodingStyle: proscribe do-while without braces Josh Triplett
2007-07-26 21:44 ` Andrew Morton
2007-07-26 21:54   ` Josh Triplett
2007-07-27  0:18 ` Krzysztof Halasa
2007-07-27  0:35   ` Andrew Morton
2007-07-27 16:00     ` Krzysztof Halasa
2007-07-27 17:05       ` Josh Triplett
2007-07-27 17:44         ` Krzysztof Halasa
2007-07-27 18:27         ` Andrew Morton
2007-07-27 18:52           ` Josh Triplett [this message]
2007-07-27  0:42   ` Stefan Richter
2007-07-27  0:59     ` Andrew Morton
2007-07-27  7:41       ` Stefan Richter
2007-07-27  7:53         ` Andrew Morton
2007-07-27 17:13           ` Stefan Richter
2007-07-27  1:17     ` Randy Dunlap

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=1185562330.2642.13.camel@josh-work.beaverton.ibm.com \
    --to=josht@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=khc@pm.waw.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).