Re: [PATCH 7/12] ARM: OMAP1: PM fixes for OMAP1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux