aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle
diff options
context:
space:
mode:
authorTuukka Tikkanen <tuukka.tikkanen@linaro.org>2013-08-14 12:02:37 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-08-22 18:24:16 -0400
commit4cd46bca8ca8ad20cadf74fd9b76364c46ed0f31 (patch)
treeca2391167ea6648998c696cc7353d2844d56a0ee /drivers/cpuidle
parent0d6a7ffa4cc67cc70bf1f4e24fbb0747632845a2 (diff)
cpuidle: CodingStyle: Break up multiple assignments on single line
The function get_typical_interval() initializes a number of variables that are immediately after declarations assigned constant values. In addition, there are multiple assignments on a single line, which is explicitly forbidden by Documentation/CodingStyle. This patch removes redundant initial values for the variables and breaks up the multiple assignment line. Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/governors/menu.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index af7b3f6b260d..94a303739ba8 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -199,14 +199,17 @@ static u64 div_round64(u64 dividend, u32 divisor)
199 */ 199 */
200static void get_typical_interval(struct menu_device *data) 200static void get_typical_interval(struct menu_device *data)
201{ 201{
202 int i = 0, divisor = 0; 202 int i, divisor;
203 uint64_t max = 0, avg = 0, stddev = 0; 203 uint64_t max, avg, stddev;
204 int64_t thresh = LLONG_MAX; /* Discard outliers above this value. */ 204 int64_t thresh = LLONG_MAX; /* Discard outliers above this value. */
205 205
206again: 206again:
207 207
208 /* first calculate average and standard deviation of the past */ 208 /* first calculate average and standard deviation of the past */
209 max = avg = divisor = stddev = 0; 209 max = 0;
210 avg = 0;
211 divisor = 0;
212 stddev = 0;
210 for (i = 0; i < INTERVALS; i++) { 213 for (i = 0; i < INTERVALS; i++) {
211 int64_t value = data->intervals[i]; 214 int64_t value = data->intervals[i];
212 if (value <= thresh) { 215 if (value <= thresh) {