mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Joe Perches <joe@perches.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, 7 Nov 2012 09:40:06 +0000	[thread overview]
Message-ID: <20121107094006.GE3066@dm> (raw)
In-Reply-To: <20121106153625.c48ba1f1.akpm@linux-foundation.org>

On Tue, Nov 06, 2012 at 03:36:25PM -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.
> 
> In particular, I don't see a problem with people doing
> 
> 	int foo = 1.1 * 2.2;

I thought there was also now a way to enable floats in kernel space and
some use thereof.

-apw

  reply	other threads:[~2012-11-07  9:40 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 [this message]
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=20121107094006.GE3066@dm \
    --to=apw@canonical.com \
    --cc=akpm@linux-foundation.org \
    --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