Re: [PATCH] drivers/base/power: be more verbose in device_pm_add()
From: Greg KH
Date: Fri Jun 04 2010 - 12:48:44 EST
On Fri, Jun 04, 2010 at 02:17:14PM +0200, Daniel Mack wrote:
> If a parentless device was added during a PM transaction, developers
> might want to know which device caused the troube. Hence, output the
> kobject's name in this case.
>
> Signed-off-by: Daniel Mack <daniel@xxxxxxxx>
> Cc: Rafael J. Wysocki <rjw@xxxxxxx>
> Cc: Len Brown <len.brown@xxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxx>
> Cc: Magnus Damm <damm@xxxxxxxxxx>
> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Cc: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
> Cc: linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
> ---
> 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 941fcb8..9e9fe6a 100644
> --- a/drivers/base/power/main.c
> +++ b/drivers/base/power/main.c
> @@ -98,7 +98,7 @@ void device_pm_add(struct device *dev)
> * transition is in progress in order to avoid leaving them
> * unhandled down the road
> */
> - dev_WARN(dev, "Parentless device registered during a PM transaction\n");
> + dev_WARN(dev, "Parentless device registered during a PM transaction: %s\n", kobject_name(&dev->kobj));
Doesn'tthe dev_WARN call already print the name of the device? Why
print it twice?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/