[<prev] [next>] [day] [month] [year] [list]
Message-Id: <3708965718cc4397b9364dab26161192828c7a1e.1376493949.git.tuukka.tikkanen@linaro.org>
Date: Wed, 14 Aug 2013 19:02:37 +0300
From: tuukka.tikkanen@...aro.org
To: rjw@...k.pl, daniel.lezcano@...aro.org, linux-pm@...r.kernel.org
Cc: private-pmwg@...aro.org, linux-kernel@...r.kernel.org,
Tuukka Tikkanen <tuukka.tikkanen@...aro.org>
Subject: [PATCH 4/8] Cpuidle: CodingStyle: Break up multiple assignments on single line
From: Tuukka Tikkanen <tuukka.tikkanen@...aro.org>
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@...aro.org>
---
drivers/cpuidle/governors/menu.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index c24b10b..fe2dd04 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)
*/
static void get_typical_interval(struct menu_device *data)
{
- int i = 0, divisor = 0;
- uint64_t max = 0, avg = 0, stddev = 0;
+ int i, divisor;
+ uint64_t max, avg, stddev;
int64_t thresh = LLONG_MAX; /* Discard outliers above this value. */
again:
/* first calculate average and standard deviation of the past */
- max = avg = divisor = stddev = 0;
+ max = 0;
+ avg = 0;
+ divisor = 0;
+ stddev = 0;
for (i = 0; i < INTERVALS; i++) {
int64_t value = data->intervals[i];
if (value <= thresh) {
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists