lkml.org 
[lkml]   [2008]   [Feb]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 4 Feb 2008 22:24:57 -0800
FromAndrew Morton <>
SubjectRe: [PATCH] Whine about suspicious return values from module's ->init() hook
On Tue, 5 Feb 2008 17:08:37 +1100 Rusty Russell <rusty@rustcorp.com.au> wrote:

> On Tuesday 05 February 2008 14:53:18 Andrew Morton wrote:
> > On Tue, 5 Feb 2008 14:43:31 +1100 Rusty Russell <rusty@rustcorp.com.au> 
> wrote:
> > > On Tuesday 05 February 2008 02:42:15 Alexey Dobriyan wrote:
> > > > One head-scratching session could be noticeably shorter with this
> > > > patch...
> > > >
> > > > Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
> > >
> > > If we want to prevent > 0 returns, let's just BUG_ON().
> >
> > That risks killing previously-working setups.  WARN_ON is sufficient.
> 
> I disagree.  WARN_ON is useful for developers, but they can handle BUG_ON, 
> too.

For developers, BUG_ON has zero benefit relative to WARN_ON.

For non-developers, BUG_ON has large disadvantages relative to WARN_ON.

It's a no-brainer.


\
 
 \ /
  Last update: 2008-02-05 07:27    [from the cache]
©2003-2008