* Re: [PATCH] bitops: simplify generic bit finding functions
[not found] ` <1209328161.14173.77.camel@brick>
@ 2008-04-27 20:36 ` Al Viro
2008-04-27 20:38 ` Harvey Harrison
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2008-04-27 20:36 UTC (permalink / raw)
To: Harvey Harrison
Cc: Linus Torvalds, Ingo Molnar, Andrew Morton, LKML, linux-sparse
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] bitops: simplify generic bit finding functions
2008-04-27 20:36 ` [PATCH] bitops: simplify generic bit finding functions Al Viro
@ 2008-04-27 20:38 ` Harvey Harrison
0 siblings, 0 replies; 2+ messages in thread
From: Harvey Harrison @ 2008-04-27 20:38 UTC (permalink / raw)
To: Al Viro; +Cc: Linus Torvalds, Ingo Molnar, Andrew Morton, LKML, linux-sparse
On Sun, 2008-04-27 at 21:36 +0100, Al Viro wrote:
> 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.
Well, even though it is a sparse problem, I think my revised version was
cleaner code anyway.
>
> Objections?
None here
Harvey
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-27 20:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` [PATCH] bitops: simplify generic bit finding functions Al Viro
2008-04-27 20:38 ` Harvey Harrison
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).