From patchwork Wed Aug 14 16:02:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tuukka.tikkanen@linaro.org X-Patchwork-Id: 2844655 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0DFB59F239 for ; Wed, 14 Aug 2013 16:19:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08D5F205BA for ; Wed, 14 Aug 2013 16:19:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDDD4205B4 for ; Wed, 14 Aug 2013 16:19:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760088Ab3HNQT3 (ORCPT ); Wed, 14 Aug 2013 12:19:29 -0400 Received: from mx.mmd.net ([80.83.0.3]:57316 "EHLO mx.mmd.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760038Ab3HNQRo (ORCPT ); Wed, 14 Aug 2013 12:17:44 -0400 Received: from t73174b.tic0.net (pc.h.tic0.net [80.83.5.114]) by mx.mmd.net (Postfix) with ESMTP id CF085FC7; Wed, 14 Aug 2013 19:01:16 +0300 (EEST) From: tuukka.tikkanen@linaro.org To: rjw@sisk.pl, daniel.lezcano@linaro.org, linux-pm@vger.kernel.org Cc: private-pmwg@linaro.org, linux-kernel@vger.kernel.org, Tuukka Tikkanen Subject: [PATCH 4/8] Cpuidle: CodingStyle: Break up multiple assignments on single line Date: Wed, 14 Aug 2013 19:02:37 +0300 Message-Id: <3708965718cc4397b9364dab26161192828c7a1e.1376493949.git.tuukka.tikkanen@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-9.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tuukka Tikkanen 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 --- 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) {