From: Andi Kleen <andi@firstfloor.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: randy.dunlap@oracle.com, lenb@kernel.org,
linux-acpi@vger.kernel.org, linux-next@vger.kernel.org
Subject: Re: [PATCH -next] acpi utmisc: use WARN_ON() instead of warn_on_slowpath()
Date: Wed, 02 Jul 2008 21:31:17 +0200 [thread overview]
Message-ID: <486BD785.5050207@firstfloor.org> (raw)
In-Reply-To: <20080702121424.a3451eae.akpm@linux-foundation.org>
Andrew Morton wrote:
> On Wed, 02 Jul 2008 20:50:04 +0200
> Andi Kleen <andi@firstfloor.org> wrote:
>
>> Randy Dunlap wrote:
>>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>>
>>> utmisc.c needs to include asm-generic/bug.h for warn()/WARN() functions,
>>> but it should use WARN_ON() instead of warn_on_slowpath() since
>>> arches can provide their own implementation of WARN_ON(), which does
>>> not have to use/provide/implement warn_on_slowpath() at all.
>>> Just use the front door (WARN_ON).
>>>
>>> linux-next-20080702/drivers/acpi/utilities/utmisc.c:1027: error: implicit declaration of function 'warn_on_slowpath'
>> On what architecture did you see that?
>
> Doesn't matter.
>
> x86, I expect. warn_on_slowpath() isn't implemented if CONFIG_BUG=n.
> warn_on_slowpath() is an internal implementation detail of the generic
> version of the WARN facility. No other code has any business using it.
>
>> It might be be better to just provide it on all architectures supported
>> by ACPI (x86, ia64). I suppose it was ia64?
>
> Let's use the proper interfaces. WARN_ON().
The problem I see here is that they are not necessarily equivalent.
In particular the function here is just a generic low level error
reporting function, but you really want to report the caller.
And that's a genuine wish. With your patch it would always
report the same function and only differ in the (potentially
unreliable) backtrace.
I think it would be better to provide a warn_on_slowpath() for
the !CONFIG_BUG case and drop this patch.
Not-Acked: ...
-Andi
next prev parent reply other threads:[~2008-07-02 19:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 17:33 [PATCH -next] bug.h: add empty warn_on_slowpath() for CONFIG_BUG=n Randy Dunlap
2008-07-01 20:17 ` Andrew Morton
2008-07-01 20:23 ` Randy Dunlap
2008-07-01 20:35 ` Andrew Morton
2008-07-02 18:28 ` [PATCH -next] acpi utmisc: use WARN_ON() instead of warn_on_slowpath() Randy Dunlap
2008-07-02 18:50 ` Andi Kleen
2008-07-02 19:14 ` Andrew Morton
2008-07-02 19:31 ` Andi Kleen [this message]
2008-07-02 19:43 ` Andrew Morton
2008-07-02 20:11 ` Andi Kleen
2008-07-02 20:35 ` Andrew Morton
2008-07-02 20:51 ` Andi Kleen
2008-07-02 21:02 ` Andrew Morton
2008-07-02 21:07 ` Andi Kleen
2008-07-02 21:14 ` Andrew Morton
2008-07-06 17:18 ` Len Brown
2008-07-06 18:13 ` Andi Kleen
2008-07-06 18:52 ` Arjan van de Ven
2008-07-07 6:19 ` Andi Kleen
2008-07-07 7:03 ` Arjan van de Ven
2008-07-08 15:44 ` Thomas Renninger
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=486BD785.5050207@firstfloor.org \
--to=andi@firstfloor.org \
--cc=akpm@linux-foundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=randy.dunlap@oracle.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.