[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070428030213.4787031f.akpm@linux-foundation.org>
Date: Sat, 28 Apr 2007 03:02:13 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Andi Kleen <andi@...stfloor.org>
Cc: Dave Jones <davej@...hat.com>,
Randy Dunlap <randy.dunlap@...cle.com>,
linux-kernel@...r.kernel.org
Subject: Re: checkpatch, a patch checking script.
On 28 Apr 2007 12:48:55 +0200 Andi Kleen <andi@...stfloor.org> wrote:
> Andrew Morton <akpm@...ux-foundation.org> writes:
>
> > box:/usr/src/25> ~/checkpatch.pl patches/slub-core.patch
> > Checking patches/slub-core.patch: signoffs = 30
> > Use WARN_ON & Recovery code rather than BUG() and BUG_ON()
>
> The warning is bogus imho. How do you write recovery code for internal
> broken code logic?
Yes, it is marginal. But people do very often reach for BUG_ON() where
they could have at least partly recovered in some fashion - enough for the
info to hit the logs so we have a better chance of fixing it.
BUG_ON() is of course sometimes the right thing to do, but the idea here is
to suggest to the developers that they put a bit of thought into whether it
was really justified.
This little checking tool should have both "error" and "warning" levels -
AKA "fix this" and "think about this" levels. BUG_ON would be a warning
thing.
-
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