From: Andrew Morton <akpm@linux-foundation.org>
To: Joe Perches <joe@perches.com>
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: Tue, 6 Nov 2012 15:36:25 -0800 [thread overview]
Message-ID: <20121106153625.c48ba1f1.akpm@linux-foundation.org> (raw)
In-Reply-To: <359a78054bc0dfaedede95222781b4177d3c33ce.1351736873.git.joe@perches.com>
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.
In particular, I don't see a problem with people doing
int foo = 1.1 * 2.2;
next prev parent reply other threads:[~2012-11-06 23:36 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 [this message]
2012-11-07 9:40 ` Andy Whitcroft
2012-11-07 11:09 ` Joe Perches
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=20121106153625.c48ba1f1.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=joe@perches.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
Powered by JetHome