From: Pavel Roskin <proski@gnu.org>
To: Josh Triplett <josh@freedesktop.org>
Cc: Morten Welinder <mwelinder@gmail.com>,
Alexey Dobriyan <adobriyan@sw.ru>,
Al Viro <viro@ftp.linux.org.uk>,
linux-kernel@vger.kernel.org, davej@codemonkey.org.uk,
Pierre Ossman <drzeus@drzeus.cx>,
akpm@osdl.org, linux-sparse@vger.kernel.org
Subject: Re: idio{,ma}tic typos (was Re: + fix-vm_can_nonlinear-check-in-sys_remap_file_pages.patch added to -mm tree)
Date: Wed, 10 Oct 2007 15:02:27 -0400 [thread overview]
Message-ID: <1192042947.29176.2.camel@dv> (raw)
In-Reply-To: <470D1535.6030708@freedesktop.org>
On Wed, 2007-10-10 at 11:08 -0700, Josh Triplett wrote:
> Sparse has a notion of "integer constant expression" already, which it
> uses to validate expressions used for things like bitfield widths or
> array sizes. I could easily have Sparse warn on any use of an integer
> constant expression as an operand of || or &&. However, I can imagine
> that that might lead to some false positives when intentionally using
> an integer constant expression in a condition and expecting the
> compiler to optimize it out at compile time.
I can imagine 0 or 1 being used, maybe -1, but hardly anything else.
Maybe you could add the code printing the value and then get some
statics on the actual Linux kernel to see which values are common and
which are not?
--
Regards,
Pavel Roskin
next prev parent reply other threads:[~2007-10-10 19:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 10:45 idio{,ma}tic typos (was Re: + fix-vm_can_nonlinear-check-in-sys_remap_file_pages.patch added to -mm tree) Alexey Dobriyan
2007-10-10 11:23 ` Andreas Schwab
2007-10-10 11:45 ` Josh Triplett
2007-10-11 7:35 ` Alexey Dobriyan
2007-10-11 9:00 ` Kyle Moffett
2007-10-11 16:27 ` Josh Triplett
2007-10-10 13:35 ` Morten Welinder
2007-10-10 18:08 ` Josh Triplett
2007-10-10 19:02 ` Pavel Roskin [this message]
2007-10-10 18:22 ` Pierre Ossman
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=1192042947.29176.2.camel@dv \
--to=proski@gnu.org \
--cc=adobriyan@sw.ru \
--cc=akpm@osdl.org \
--cc=davej@codemonkey.org.uk \
--cc=drzeus@drzeus.cx \
--cc=josh@freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=mwelinder@gmail.com \
--cc=viro@ftp.linux.org.uk \
/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).