[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-omap
Subject: Re: [PATCH 7/12] ARM: OMAP1: PM fixes for OMAP1
From: Russell King - ARM Linux <linux () arm ! linux ! org ! uk>
Date: 2007-12-31 14:33:21
Message-ID: 20071231143321.GD31777 () flint ! arm ! linux ! org ! uk
[Download RAW message or body]
On Mon, Dec 17, 2007 at 09:56:53PM -0800, Tony Lindgren wrote:
> @@ -668,8 +670,6 @@ static struct platform_suspend_ops omap_pm_ops ={
>
> static int __init omap_pm_init(void)
> {
> - int error;
> -
> printk("Power Management for TI OMAP.\n");
>
> /*
> @@ -726,9 +726,10 @@ static int __init omap_pm_init(void)
> omap_pm_init_proc();
> #endif
>
> - error = subsys_create_file(&power_subsys, &sleep_while_idle_attr);
> - if (error)
> - printk(KERN_ERR "subsys_create_file failed: %d\n", error);
> +#ifdef CONFIG_OMAP_32K_TIMER
> + if (subsys_create_file(&power_subsys, &sleep_while_idle_attr))
> + printk(KERN_ERR "%s :subsys_create_file failed", __FUNCTION__);
> +#endif
>
> if (cpu_is_omap16xx()) {
> /* configure LOW_PWR pin */
This looks silly - firstly why hide the error code? Secondly, what use
is __FUNCTION__ here? Wouldn't it be better to say something like:
printk(KERN_ERR "unable to create sysfs/power/idle: %d", error);
(I personally hate the use of __FUNCTION__ and __FILE__ in errors -
error messages should be descriptive enough that they're more or less
obvious where something's gone wrong.)
-
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic