public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Randy Dunlap <randy.dunlap@oracle•com>
To: Andrew Morton <akpm@linux-foundation•org>
Cc: andi@firstfloor•org, Len Brown <lenb@kernel•org>,
	linux-acpi@vger•kernel.org, linux-next@vger•kernel.org
Subject: [PATCH -next] acpi utmisc: use WARN_ON() instead of warn_on_slowpath()
Date: Wed, 2 Jul 2008 11:28:52 -0700	[thread overview]
Message-ID: <20080702112852.05f30950.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20080701133535.f92a673c.akpm@linux-foundation.org>

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'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle•com>
---
 drivers/acpi/utilities/utmisc.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- linux-next-20080702.orig/drivers/acpi/utilities/utmisc.c
+++ linux-next-20080702/drivers/acpi/utilities/utmisc.c
@@ -42,6 +42,7 @@
  */
 
 #include <linux/module.h>
+#include <asm-generic/bug.h>
 
 #include <acpi/acpi.h>
 #include <acpi/acnamesp.h>
@@ -1024,7 +1025,7 @@ acpi_ut_error(const char *module_name, u
 {
 	va_list args;
 
-	warn_on_slowpath(module_name, line_number);
+	WARN_ON(1);
 	acpi_os_printf("ACPI Error (%s-%04d): ", module_name, line_number);
 
 	va_start(args, format);
@@ -1039,7 +1040,7 @@ acpi_ut_exception(const char *module_nam
 {
 	va_list args;
 
-	warn_on_slowpath(module_name, line_number);
+	WARN_ON(1);
 	acpi_os_printf("ACPI Exception (%s-%04d): %s, ", module_name,
 		       line_number, acpi_format_exception(status));
 


---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

       reply	other threads:[~2008-07-02 18:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080701103339.b5acc1f3.randy.dunlap@oracle.com>
     [not found] ` <20080701131714.5093fa49.akpm@linux-foundation.org>
     [not found]   ` <23433248.1214943818230.JavaMail.oracle@acsmt302.oracle.com>
     [not found]     ` <20080701133535.f92a673c.akpm@linux-foundation.org>
2008-07-02 18:28       ` Randy Dunlap [this message]
2008-07-02 18:50         ` [PATCH -next] acpi utmisc: use WARN_ON() instead of warn_on_slowpath() Andi Kleen
2008-07-02 19:14           ` Andrew Morton
2008-07-02 19:31             ` Andi Kleen
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=20080702112852.05f30950.randy.dunlap@oracle.com \
    --to=randy.dunlap@oracle$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=andi@firstfloor$(echo .)org \
    --cc=lenb@kernel$(echo .)org \
    --cc=linux-acpi@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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