* [PATCH] sched / idle: Make cpuidle_idle_call() void
@ 2014-04-20 23:26 Rafael J. Wysocki
2014-04-22 11:49 ` Peter Zijlstra
2014-05-08 10:47 ` [tip:sched/core] sched/idle: " tip-bot for Rafael J. Wysocki
0 siblings, 2 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2014-04-20 23:26 UTC (permalink / raw)
To: Linux PM list
Cc: Linux Kernel Mailing List, Daniel Lezcano, Ingo Molnar, Peter Zijlstra
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(-)
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;
}
/*
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched / idle: Make cpuidle_idle_call() void
2014-04-20 23:26 [PATCH] sched / idle: Make cpuidle_idle_call() void Rafael J. Wysocki
@ 2014-04-22 11:49 ` Peter Zijlstra
2014-04-22 23:36 ` Rafael J. Wysocki
2014-05-08 10:47 ` [tip:sched/core] sched/idle: " tip-bot for Rafael J. Wysocki
1 sibling, 1 reply; 5+ messages in thread
From: Peter Zijlstra @ 2014-04-22 11:49 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM list, Linux Kernel Mailing List, Daniel Lezcano, Ingo Molnar
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!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched / idle: Make cpuidle_idle_call() void
2014-04-22 11:49 ` Peter Zijlstra
@ 2014-04-22 23:36 ` Rafael J. Wysocki
2014-04-23 5:36 ` Peter Zijlstra
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2014-04-22 23:36 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Linux PM list, Linux Kernel Mailing List, Daniel Lezcano, Ingo Molnar
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 speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] sched / idle: Make cpuidle_idle_call() void
2014-04-22 23:36 ` Rafael J. Wysocki
@ 2014-04-23 5:36 ` Peter Zijlstra
0 siblings, 0 replies; 5+ messages in thread
From: Peter Zijlstra @ 2014-04-23 5:36 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux PM list, Linux Kernel Mailing List, Daniel Lezcano, Ingo Molnar
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:sched/core] sched/idle: Make cpuidle_idle_call() void
2014-04-20 23:26 [PATCH] sched / idle: Make cpuidle_idle_call() void Rafael J. Wysocki
2014-04-22 11:49 ` Peter Zijlstra
@ 2014-05-08 10:47 ` tip-bot for Rafael J. Wysocki
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Rafael J. Wysocki @ 2014-05-08 10:47 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, torvalds, peterz, rafael.j.wysocki,
tglx, daniel.lezcano
Commit-ID: 08c373e5123b4595588ae1a7aa7e00a046c61cc6
Gitweb: http://git.kernel.org/tip/08c373e5123b4595588ae1a7aa7e00a046c61cc6
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
AuthorDate: Mon, 21 Apr 2014 01:26:58 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 8 May 2014 09:17:00 +0200
sched/idle: Make cpuidle_idle_call() void
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>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/4717784.WmVEpDoliM@vostro.rjw.lan
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
kernel/sched/idle.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 88a6bc4..34083c9 100644
--- a/kernel/sched/idle.c
+++ b/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);
@@ -82,7 +81,7 @@ static int cpuidle_idle_call(void)
*/
if (need_resched()) {
local_irq_enable();
- return 0;
+ return;
}
/*
@@ -177,8 +176,6 @@ exit_idle:
rcu_idle_exit();
start_critical_timings();
-
- return 0;
}
/*
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-08 10:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-20 23:26 [PATCH] sched / idle: Make cpuidle_idle_call() void Rafael J. Wysocki
2014-04-22 11:49 ` Peter Zijlstra
2014-04-22 23:36 ` Rafael J. Wysocki
2014-04-23 5:36 ` Peter Zijlstra
2014-05-08 10:47 ` [tip:sched/core] sched/idle: " tip-bot for Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome