[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.999.0707191100480.27353@woody.linux-foundation.org>
Date: Thu, 19 Jul 2007 11:04:29 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Krzysztof Halasa <khc@...waw.pl>
cc: Jeff Garzik <jeff@...zik.org>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>, ak@...e.de,
adaplas@...il.com, linux-fbdev-devel@...ts.sourceforge.net,
benh@...nel.crashing.org
Subject: Re: [git patches] two warning fixes
On Thu, 19 Jul 2007, Krzysztof Halasa wrote:
>
> Jeff Garzik <jeff@...zik.org> writes:
>
> > My overall goal is killing useless warnings
> > that continually obscure real ones.
>
> Precisely, the goal should be to make must_check (and similar things)
> warn only in real cases.
.. the problem with that mentality is that it's not how people work.
People shut up warnings by adding code.
Adding code tends to add bugs.
People don't generally think "maybe that warning was bogus".
More people *should* generally ask themselves: "was the warning worth it?"
and then, if the answer is "no", they shouldn't add code, they should
remove the thing that causes the warning in the first place.
For example, for compiler options, the correct thign is often to just say
"that option was broken", and not use "-fsign-warning", for example. We've
literally have had bugs *added* because people "fixed" a sign warning.
More than once, in fact.
Every time you see a warning, you should ask yourself: is the warning
interesting, correct and valid? And if it isn't all three, then the
problem is whatever *causes* the warning, not the code itself.
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