[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyDufcXR62j=crthVkNybk5is+c-zzr+LRmj_QSUskfmg@mail.gmail.com>
Date: Mon, 25 Jul 2011 12:48:48 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ingo Molnar <mingo@...e.hu>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaud Lacombe <lacombar@...il.com>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] core/locking changes for v3.1
On Mon, Jul 25, 2011 at 12:04 PM, Ingo Molnar <mingo@...e.hu> wrote:
> ..
> net/netfilter/nf_conntrack_core.c: In function ‘nf_conntrack_init’:
> net/netfilter/nf_conntrack_core.c:1579:3: warning: the comparison
> will always evaluate as ‘true’ for the address of
> ‘nf_conntrack_attach’ will never be NULL [-Waddress]
These all seem to be essentially compiler bugs.
We have macros that do generic things (in this case
"rcu_assign_pointer()" and tests their values. The fact that the tests
sometimes end up being statically true (or false) is not something the
compiler should complain about - it should use it to optimize the
code.
Sad.
We can make a compiler bug-report, or disable -Waddress. Or maybe we
can write the tests in a way that doesn't trigger the compiler bug.
This same issue is why I hated -Wsign-compare. Some of the things gcc
complained about were just technically moronic. So compiler warnings
are not always a good thing.
Linus
--
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