From: David Miller <davem@davemloft.net>
To: heiko.carstens@de.ibm.com
Cc: schwidefsky@de.ibm.com, linux-kernel@vger.kernel.org,
linux-s390@vger.kernel.org
Subject: Re: [S390] Use generic bug.
Date: Tue, 06 Mar 2007 10:47:29 -0800 (PST) [thread overview]
Message-ID: <20070306.104729.43502575.davem@davemloft.net> (raw)
In-Reply-To: <20070306115917.GA28321@osiris.boeblingen.de.ibm.com>
From: Heiko Carstens <heiko.carstens@de.ibm.com>
Date: Tue, 6 Mar 2007 12:59:17 +0100
> On Mon, Mar 05, 2007 at 02:56:29PM -0800, David Miller wrote:
> > From: Martin Schwidefsky <schwidefsky@de.ibm.com>
> > Date: Mon, 5 Mar 2007 23:43:54 +0100
> >
> > > + if (__builtin_constant_p(__ret_warn_on)) { \
> > > + if (__ret_warn_on) \
> > > + __EMIT_BUG(BUGFLAG_WARNING); \
> >
> > I see we'll have this construct on powerpc, parisc and now s390.
> >
> > But if it's going to trigger essentially at compile time, I
> > think it's much better to BUILD_BUG_ON() in this case instead
> > of counting on the code path to actually run and the user to
> > notice and report the kernel log message.
>
> So something like WARN_ON(1) won't compile, but BUG_ON(1) still
> would? Seems odd to me.
> Also since there is nothing like WARN(), you have to use WARN_ON(1).
> Btw.: sparc64 has plenty of these ;)
I see. It's for case where we can't put the test into the
WARN_ON() call.
Thanks for the explanation, I hadn't considered such cases.
prev parent reply other threads:[~2007-03-06 18:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 22:43 [S390] Use generic bug Martin Schwidefsky
2007-03-05 22:56 ` David Miller
2007-03-06 11:59 ` Heiko Carstens
2007-03-06 18:47 ` David Miller [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=20070306.104729.43502575.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.