summaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorTuukka Tikkanen <tuukka.tikkanen@linaro.org>2013-08-14 16:02:39 (GMT)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-22 22:24:16 (GMT)
commit0e96d5adcfef22f86e4463909728d63f88944749 (patch)
treed7b346092439ab0b0fa2a12f444eef614dfbce9b /COPYING
parent939e33b7fcd4980f21ff4c9558eb27fe81d16cdb (diff)
downloadlinux-0e96d5adcfef22f86e4463909728d63f88944749.tar.xz
cpuidle: Fix variable domains in get_typical_interval()
The menu governor uses a static function get_typical_interval() to try to detect a repeating pattern of wakeups. The previous interval durations are stored as an array of unsigned ints, but the arithmetic in the function is performed exclusively as 64 bit values, even when the value stored in a variable is known not to exceed unsigned int, which may be smaller and more efficient on some platforms. This patch changes the types of varibles used to store some intermediates, the maximum and and the cutoff threshold to unsigned ints. Average and standard deviation are still treated as 64 bit values, even when the values are known to be within the domain of unsigned int, to avoid casts to ensure correct integer promotion for arithmetic operations. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions