diff mbox

sched / idle: Make cpuidle_idle_call() void

Message ID 4717784.WmVEpDoliM@vostro.rjw.lan (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Rafael J. Wysocki April 20, 2014, 11:26 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

The only value ever returned by cpuidle_idle_call() is 0 and its
only caller ignores that value anyway, so make it void.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 kernel/sched/idle.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)


--
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

Comments

Peter Zijlstra April 22, 2014, 11:49 a.m. UTC | #1
On Mon, Apr 21, 2014 at 01:26:58AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> The only value ever returned by cpuidle_idle_call() is 0 and its
> only caller ignores that value anyway, so make it void.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Thanks!
--
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
Rafael J. Wysocki April 22, 2014, 11:36 p.m. UTC | #2
On Tuesday, April 22, 2014 01:49:30 PM Peter Zijlstra wrote:
> On Mon, Apr 21, 2014 at 01:26:58AM +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > The only value ever returned by cpuidle_idle_call() is 0 and its
> > only caller ignores that value anyway, so make it void.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> Thanks!

OK, thanks, so should it go through my tree or through tip?
Peter Zijlstra April 23, 2014, 5:36 a.m. UTC | #3
On Wed, Apr 23, 2014 at 01:36:42AM +0200, Rafael J. Wysocki wrote:
> On Tuesday, April 22, 2014 01:49:30 PM Peter Zijlstra wrote:
> > On Mon, Apr 21, 2014 at 01:26:58AM +0200, Rafael J. Wysocki wrote:
> > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > > 
> > > The only value ever returned by cpuidle_idle_call() is 0 and its
> > > only caller ignores that value anyway, so make it void.
> > > 
> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > Thanks!
> 
> OK, thanks, so should it go through my tree or through tip?

I'll take it through tip where there's more patches that touch this
code.
--
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

Index: linux-pm/kernel/sched/idle.c
===================================================================
--- linux-pm.orig/kernel/sched/idle.c
+++ linux-pm/kernel/sched/idle.c
@@ -67,9 +67,8 @@  void __weak arch_cpu_idle(void)
  * cpuidle_idle_call - the main idle function
  *
  * NOTE: no locks or semaphores should be used here
- * return non-zero on failure
  */
-static int cpuidle_idle_call(void)
+static void cpuidle_idle_call(void)
 {
 	struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices);
 	struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev);
@@ -84,7 +83,7 @@  static int cpuidle_idle_call(void)
 	if (current_clr_polling_and_test()) {
 		local_irq_enable();
 		__current_set_polling();
-		return 0;
+		return;
 	}
 
 	/*
@@ -189,8 +188,6 @@  static int cpuidle_idle_call(void)
 
 	rcu_idle_exit();
 	start_critical_timings();
-
-	return 0;
 }
 
 /*