diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2014-06-24 00:31:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-07-05 05:17:31 -0400 |
commit | 89abb5ad10ae8ac3405e635ac80815f781c8b8e9 (patch) | |
tree | 13ef41930fadb7894ac92c953a078da8123f1d80 | |
parent | 4036ac1567834222fc763ab18e3e17df93b4eaaf (diff) |
sched/idle: Drop !! while calculating 'broadcast'
We don't need 'broadcast' to be set to 'zero or one', but to 'zero or non-zero'
and so the extra operation to convert it to 'zero or one' can be skipped.
Also change type of 'broadcast' to unsigned int, i.e. type of
drv->states[*].flags.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linaro-kernel@lists.linaro.org
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/0dfbe2976aa108c53e08d3477ea90f6360c1f54c.1403584026.git.viresh.kumar@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | kernel/sched/idle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c index cf009fb0bc25..9f1608f99819 100644 --- a/kernel/sched/idle.c +++ b/kernel/sched/idle.c | |||
@@ -79,7 +79,7 @@ static void cpuidle_idle_call(void) | |||
79 | struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); | 79 | struct cpuidle_device *dev = __this_cpu_read(cpuidle_devices); |
80 | struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); | 80 | struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev); |
81 | int next_state, entered_state; | 81 | int next_state, entered_state; |
82 | bool broadcast; | 82 | unsigned int broadcast; |
83 | 83 | ||
84 | /* | 84 | /* |
85 | * Check if the idle task must be rescheduled. If it is the | 85 | * Check if the idle task must be rescheduled. If it is the |
@@ -135,7 +135,7 @@ use_default: | |||
135 | goto exit_idle; | 135 | goto exit_idle; |
136 | } | 136 | } |
137 | 137 | ||
138 | broadcast = !!(drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP); | 138 | broadcast = drv->states[next_state].flags & CPUIDLE_FLAG_TIMER_STOP; |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * Tell the time framework to switch to a broadcast timer | 141 | * Tell the time framework to switch to a broadcast timer |