[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <617E1C2C70743745A92448908E030B2A022A009A@scsmsx411.amr.corp.intel.com>
Date: Tue, 14 Aug 2007 15:06:12 -0700
From: "Luck, Tony" <tony.luck@...el.com>
To: "Chris Snook" <csnook@...hat.com>, <clameter@....com>
Cc: <linux-arch@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Linus Torvalds" <torvalds@...ux-foundation.org>,
<akpm@...ux-foundation.org>, <paulmck@...ux.vnet.ibm.com>,
"Segher Boessenkool" <segher@...nel.crashing.org>,
"Chris Friesen" <cfriesen@...tel.com>,
"Robert P. J. Day" <rpjday@...dspring.com>
Subject: RE: [PATCH 10/23] make atomic_read() and atomic_set() behavior consistent on ia64
>> include/linux/skbuff.h:521: warning: passing arg 1 of `atomic_read' discards qualifiers from pointer target type
>> include/net/sock.h:1244: warning: passing arg 1 of `atomic_read' discards qualifiers from pointer target type
>> include/net/tcp.h:958: warning: passing arg 1 of `atomic_read' discards qualifiers from pointer target type
>> mm/slub.c:3115: warning: passing arg 1 of `atomic_read' from incompatible pointer type
>> mm/slub.c:3250: warning: passing arg 1 of `atomic_read' from incompatible pointer type
>> mm/slub.c:3286: warning: passing arg 1 of `atomic_read' from incompatible pointer type
> Do you get any warnings other than those two?
That looks like six, not two. But that's the whole list.
>IIRC, when you applied a version which used macros instead, there was no change.
> It would seem that inlining changed the optimization behavior of the compiler.
> If you turn down the optimization level, do the macro and inline versions look
> the same, or at least more similar?
I re-tried the macros ... the three warnings from mm/slub.c all result in
broken code ... and quite rightly too, they all come from code that does:
atomic_read(&n->nr_slabs)
But the nr_slabs field is an atomic_long_t, so we shouldn't be using
atomic_read(). I didn't spot these last time around because I was using
slab, not slub for the previous build.
I think that I'll run into other build issues if I turn down the
optimization level (there are lots of places where the kernel relies
on optimizing away impossible cases in switch statements.
> The binary does boot ... but I haven't run any tests to see whether
> there are any problems.
-Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists