From patchwork Fri Jan 2 05:46:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42668 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f199.google.com (mail-we0-f199.google.com [74.125.82.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A13B826CB5 for ; Fri, 2 Jan 2015 05:47:45 +0000 (UTC) Received: by mail-we0-f199.google.com with SMTP id k11sf2014501wes.6 for ; Thu, 01 Jan 2015 21:47:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=NWt9uCj3mMOcZeMb6p7tFry+2my6A/6ej5TqWvyyjvw=; b=dER0kpGnz7qxcSxBK7WMA5nYZFeFxQWvI57vmzApOh4zRfNRoMPXrBY5G4Fxhxd4Of 2/wknm5xJ4EmhhsDFFTnMAheHJbKLXa6xIcjLJYmUz0hyN9X25pzHS8zSlgWQLTEOxUF MVQAXvfsDxl9pZDJ/1u9NJV8zZQAmuY90u9vsrCe/SBKTnnZA2o72FzemvaMXK6dqlOS UJCdOBSZK/OSN/8c0+yZCtl3ogSJNGskb3E2TD5ze4AfP+uz1kS3Inkkw+XyOTqbFcfa HasJKxggLJpPOe0V1GwTxHUnPwEsM/+xnO60EmLWeDgbR3BRqoUPu5Ol4nCGFf9ERVf7 pl0Q== X-Gm-Message-State: ALoCoQnuhqt96Wia24MQA7fqFNn0P4zcV3N/yYAXXpiv3yH4YFXjAgqdftALPhVoq+CBkEJlPO0n X-Received: by 10.112.54.165 with SMTP id k5mr1235150lbp.5.1420177664836; Thu, 01 Jan 2015 21:47:44 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.205.38 with SMTP id ld6ls2424138lac.50.gmail; Thu, 01 Jan 2015 21:47:44 -0800 (PST) X-Received: by 10.112.130.65 with SMTP id oc1mr75005616lbb.7.1420177664498; Thu, 01 Jan 2015 21:47:44 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id wn3si33462109lbb.25.2015.01.01.21.47.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 21:47:44 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id gf13so14858381lab.21 for ; Thu, 01 Jan 2015 21:47:44 -0800 (PST) X-Received: by 10.152.43.103 with SMTP id v7mr74893126lal.29.1420177664043; Thu, 01 Jan 2015 21:47:44 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp114504lbb; Thu, 1 Jan 2015 21:47:43 -0800 (PST) X-Received: by 10.70.130.229 with SMTP id oh5mr121970696pdb.39.1420177662049; Thu, 01 Jan 2015 21:47:42 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si68097479pdc.177.2015.01.01.21.47.41; Thu, 01 Jan 2015 21:47:42 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750737AbbABFrk (ORCPT + 12 others); Fri, 2 Jan 2015 00:47:40 -0500 Received: from mail-pd0-f172.google.com ([209.85.192.172]:64105 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbbABFrk (ORCPT ); Fri, 2 Jan 2015 00:47:40 -0500 Received: by mail-pd0-f172.google.com with SMTP id y13so23306558pdi.3 for ; Thu, 01 Jan 2015 21:47:39 -0800 (PST) X-Received: by 10.70.128.15 with SMTP id nk15mr117981809pdb.121.1420177659738; Thu, 01 Jan 2015 21:47:39 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id nl14sm34728683pdb.81.2015.01.01.21.47.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 21:47:39 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar Subject: [PATCH V2 10/14] cpufreq: stats: don't update stats from show_trans_table() Date: Fri, 2 Jan 2015 11:16:47 +0530 Message-Id: X-Mailer: git-send-email 2.2.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , cpufreq_stats_update() updates time_in_state and nothing else. It should ideally be updated only in two cases: - User requested for the current value of time_in_state. - We have switched states and so need to update time for the last state. Currently, we are also doing this while user asks for the transition table of frequencies. It wouldn't do any harm, but no good as well. Its useless here. Remove it. Reviewed-by: Prarit Bhargava Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_stats.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index dd55d57655ce..c0c2ddece8fe 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -77,7 +77,6 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) ssize_t len = 0; int i, j; - cpufreq_stats_update(stat); len += snprintf(buf + len, PAGE_SIZE - len, " From : To\n"); len += snprintf(buf + len, PAGE_SIZE - len, " : "); for (i = 0; i < stat->state_num; i++) {