[lkml]   [2008]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 32/46] debug: use dev_WARN() rather than WARN_ON() in device_pm_add()
From: Arjan van de Ven <>

device_pm_add() has a WARN_ON that is showing relatively high on, but unfortunately the WARN_ON is less than useful
in that it doesn't print any information about what device is causing
the issue.

This patch fixes this by turning the WARN_ON() into the newly
introduces dev_WARN() which will print information about the
device in question.

Signed-off-by: Arjan van de Ven <>
Signed-off-by: Greg Kroah-Hartman <>
drivers/base/power/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 273a944..b0eb6af 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -83,7 +83,7 @@ void device_pm_add(struct device *dev)
* transition is in progress in order to avoid leaving them
* unhandled down the road
- WARN_ON(true);
+ dev_WARN(dev, "Parentless device registered during a PM transaction\n");

list_add_tail(&dev->power.entry, &dpm_list);

 \ /
  Last update: 2008-10-16 19:29    [W:0.195 / U:8.336 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site