linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-sparse@vger.kernel.org
Subject: Re: [PATCH] bitops: simplify generic bit finding functions
Date: Sun, 27 Apr 2008 21:36:38 +0100	[thread overview]
Message-ID: <20080427203638.GW5882@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1209328161.14173.77.camel@brick>

On Sun, Apr 27, 2008 at 01:29:21PM -0700, Harvey Harrison wrote:

> Oh, I didn't realize, I only did this because sparse started spewing out
> lots of:
> include/linux/bitops.h:166:32: warning: shift too big (65536) for type unsigned long
> 
> due to shift by size there, and again on line 202...I just wanted something
> that sparse wouldn't warn about and was a little easier to understand to boot.

That's a sparse problem, really.  I wonder if we simply should introduce a
new node type: EXPR_WARN.  So that expand would generate those from things
like division by zero/overflow/bad shift *and* emitting an insn for those
would generate a stored warning.

Objections?

       reply	other threads:[~2008-04-27 20:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1209327591.14173.74.camel@brick>
     [not found] ` <alpine.LFD.1.10.0804271325350.3119@woody.linux-foundation.org>
     [not found]   ` <1209328161.14173.77.camel@brick>
2008-04-27 20:36     ` Al Viro [this message]
2008-04-27 20:38       ` [PATCH] bitops: simplify generic bit finding functions Harvey Harrison

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=20080427203638.GW5882@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sparse@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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).