projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3a987b
)
cpuidle: teo: Fix intervals[] array indexing bug
author
Ikjoon Jang
<ikjn@chromium.org>
Fri, 10 Jan 2020 17:47:12 +0000
(
01:47
+0800)
committer
Rafael J. Wysocki
<rafael.j.wysocki@intel.com>
Mon, 13 Jan 2020 10:14:58 +0000
(11:14 +0100)
Fix a simple bug in rotating array index.
Fixes:
b26bf6ab716f
("cpuidle: New timer events oriented governor for tickless systems")
Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Cc: 5.1+ <stable@vger.kernel.org> # 5.1+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/governors/teo.c
patch
|
blob
|
history
diff --git
a/drivers/cpuidle/governors/teo.c
b/drivers/cpuidle/governors/teo.c
index
de7e706
..
6deaaf5
100644
(file)
--- a/
drivers/cpuidle/governors/teo.c
+++ b/
drivers/cpuidle/governors/teo.c
@@
-198,7
+198,7
@@
static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev)
* pattern detection.
*/
cpu_data->intervals[cpu_data->interval_idx++] = measured_ns;
- if (cpu_data->interval_idx > INTERVALS)
+ if (cpu_data->interval_idx >
=
INTERVALS)
cpu_data->interval_idx = 0;
}