From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@canonical.com>,
Adil Mujeeb <mujeeb.adil@gmail.com>, Pavel Machek <pavel@ucw.cz>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 3/3] checkpatch: Emit an warning when floating point values are used
Date: Wed, 07 Nov 2012 03:09:35 -0800 [thread overview]
Message-ID: <1352286575.4164.2.camel@joe-AO722> (raw)
In-Reply-To: <20121106153625.c48ba1f1.akpm@linux-foundation.org>
On Tue, 2012-11-06 at 15:36 -0800, Andrew Morton wrote:
> On Thu, 1 Nov 2012 00:12:18 -0700
> Joe Perches <joe@perches.com> wrote:
> > Linux kernel doesn't like floating point, say so.
[]
> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -2332,6 +2332,13 @@ sub process {
> > "do not add new typedefs\n" . $herecurr);
> > }
> >
> > +# check for floating point constants
> > +
> > + if ($line =~ /\b$Float\b/) {
> > + WARN("KERNEL_FLOAT",
> > + "Floating point is not supported in linux kernel source\n" . $herecurr);
> > + }
> > +
> > # * goes on variable not on type
> > # (char*[ const])
> > while ($line =~ m{(\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\))}g) {
>
> The earlier review comments were not addressed.
You didn't read my response in the thread then.
I "addressed" it by saying that the problem exists
without solution.
> In particular, I don't see a problem with people doing
>
> int foo = 1.1 * 2.2;
Neither do I but I know of no way to determine that any
calc is a constant.
next prev parent reply other threads:[~2012-11-07 11:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 7:10 [PATCH V2 0/3] checkpatch: Add support for floating point constants Joe Perches
2012-11-01 7:12 ` [PATCH V2 1/3] checkpatch: Find hex constants as a single IDENT Joe Perches
2012-11-01 7:12 ` [PATCH V2 2/3] checkpatch: Add support for floating point constants Joe Perches
2012-11-01 7:12 ` [PATCH V2 3/3] checkpatch: Emit an warning when floating point values are used Joe Perches
2012-11-06 23:36 ` Andrew Morton
2012-11-07 9:40 ` Andy Whitcroft
2012-11-07 11:09 ` Joe Perches [this message]
2012-11-07 16:52 ` Andrew Morton
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=1352286575.4164.2.camel@joe-AO722 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mujeeb.adil@gmail.com \
--cc=pavel@ucw.cz \
/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