public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix generic WARN_ON message
Date: Wed, 25 Oct 2006 23:42:57 +0200	[thread overview]
Message-ID: <20061025214257.GA2578@elf.ucw.cz> (raw)
In-Reply-To: <1161809722.3207.3.camel@localhost.localdomain>

On Wed 2006-10-25 16:55:22, Steven Rostedt wrote:
> On Wed, 2006-10-25 at 12:04 +0200, Pavel Machek wrote:
> > Hi!
> > 
> > > * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> > > 
> > > > A warning is a warning, not a BUG.
> > > 
> > > > -		printk("BUG: warning at %s:%d/%s()\n", __FILE__,	\
> > > > +		printk("WARNING at %s:%d %s()\n", __FILE__,	\
> > > 
> > > i'm not really happy about this change.
> > > 
> > > Firstly, most WARN_ON()s are /bugs/, not warnings ... If it's a real 
> > > warning, a KERN_INFO printk should be done.
> > > 
> > > Secondly, the reason i changed it to the 'BUG: ...' format is that i 
> > > tried to make it easier for automated tools (and for users) to figure 
> > > out that a kernel bug happened.
> > 
> > Well... but the message is really bad. It leads to users telling us "I
> > hit BUG in kernel"...
> 
> But they *did* hit a BUG. It just so happens that the BUG was fixable.
> We want this reported because a WARN_ON should *never* be hit unless
> there's a bug.  If people start getting "WARNING" messages, they will
> more likely not be reporting them.
> 
> As Ingo already said, if it is just a "warning" then a normal printk
> should be used.

Fine, then why is the macro called WARN_ON()? That's certainly highly
confusing.

NONFATAL_BUG_ON()?

I hate people reporting BUG (or BUG()) when they hit WARN_ON(), and
current wording certainly makes it easy.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

      reply	other threads:[~2006-10-25 21:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18  2:23 [PATCH] Fix generic WARN_ON message Jeremy Fitzhardinge
2006-10-18  5:55 ` Ingo Molnar
2006-10-18 18:32   ` Jeremy Fitzhardinge
2006-10-18 18:40     ` Nick Piggin
2006-10-25 10:04   ` Pavel Machek
2006-10-25 20:55     ` Steven Rostedt
2006-10-25 21:42       ` Pavel Machek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061025214257.GA2578@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox