diff mbox

[09/16] ia64 idle: delete pm_idle

Message ID 7dc2a692a27e9c3da86acf150c4a89024e48bd05.1360475150.git.len.brown@intel.com (mailing list archive)
State New, archived
Delegated to: Len Brown
Headers show

Commit Message

Len Brown Feb. 10, 2013, 5:58 a.m. UTC
From: Len Brown <len.brown@intel.com>

pm_idle() on ia64 was a synonym for default_idle().
So simply invoke default_idle() directly.

Signed-off-by: Len Brown <len.brown@intel.com>
Cc: linux-ia64@vger.kernel.org
---
 arch/ia64/kernel/process.c | 3 ---
 arch/ia64/kernel/setup.c   | 1 -
 2 files changed, 4 deletions(-)

Comments

Lars-Peter Clausen Feb. 21, 2013, 10:15 a.m. UTC | #1
On 02/10/2013 06:58 AM, Len Brown wrote:
> From: Len Brown <len.brown@intel.com>
> 
> pm_idle() on ia64 was a synonym for default_idle().
> So simply invoke default_idle() directly.
> 
> Signed-off-by: Len Brown <len.brown@intel.com>
> Cc: linux-ia64@vger.kernel.org
> ---
>  arch/ia64/kernel/process.c | 3 ---
>  arch/ia64/kernel/setup.c   | 1 -
>  2 files changed, 4 deletions(-)
> 
> diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
> index 31360cb..e34f565 100644
> --- a/arch/ia64/kernel/process.c
> +++ b/arch/ia64/kernel/process.c
> @@ -57,8 +57,6 @@ void (*ia64_mark_idle)(int);
>  
>  unsigned long boot_option_idle_override = IDLE_NO_OVERRIDE;
>  EXPORT_SYMBOL(boot_option_idle_override);
> -void (*pm_idle) (void);
> -EXPORT_SYMBOL(pm_idle);
>  void (*pm_power_off) (void);
>  EXPORT_SYMBOL(pm_power_off);
>  
> @@ -301,7 +299,6 @@ cpu_idle (void)
>  			if (mark_idle)
>  				(*mark_idle)(1);
>  
> -			idle = pm_idle;
>  			if (!idle)

Hm, if I'm not mistaken idle will uninitialized at this point, so this could
quite likely lead to a crash.

>  				idle = default_idle;
>  			(*idle)();
> diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
> index aaefd9b..2029cc0 100644
> --- a/arch/ia64/kernel/setup.c
> +++ b/arch/ia64/kernel/setup.c
> @@ -1051,7 +1051,6 @@ cpu_init (void)
>  		max_num_phys_stacked = num_phys_stacked;
>  	}
>  	platform_cpu_init();
> -	pm_idle = default_idle;
>  }
>  
>  void __init

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Len Brown March 26, 2013, 3:12 a.m. UTC | #2
> > -			idle = pm_idle;
> >  			if (!idle)
> 
> Hm, if I'm not mistaken idle will uninitialized at this point, so this
> could quite likely lead to a crash.


thanks,
will fix.

-Len

--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index 31360cb..e34f565 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -57,8 +57,6 @@  void (*ia64_mark_idle)(int);
 
 unsigned long boot_option_idle_override = IDLE_NO_OVERRIDE;
 EXPORT_SYMBOL(boot_option_idle_override);
-void (*pm_idle) (void);
-EXPORT_SYMBOL(pm_idle);
 void (*pm_power_off) (void);
 EXPORT_SYMBOL(pm_power_off);
 
@@ -301,7 +299,6 @@  cpu_idle (void)
 			if (mark_idle)
 				(*mark_idle)(1);
 
-			idle = pm_idle;
 			if (!idle)
 				idle = default_idle;
 			(*idle)();
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index aaefd9b..2029cc0 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -1051,7 +1051,6 @@  cpu_init (void)
 		max_num_phys_stacked = num_phys_stacked;
 	}
 	platform_cpu_init();
-	pm_idle = default_idle;
 }
 
 void __init