From patchwork Tue Jan 6 15:39:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42783 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BF0FE2055F for ; Tue, 6 Jan 2015 15:40:33 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf1949698eek.1 for ; Tue, 06 Jan 2015 07:40:32 -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=RK+r9nk3ExbrriQsq8jcWR6c3dFiu09oPejIG9HhDY8=; b=A+9L/Y5nIuV7bwQBcvVUiZBr5UD3uvPTPjtVaY4NVAi9heZ5WtQj6cEpcyLQLkKIhO bRpuoSYdz9aB7bG9dOUGDnoxOagLaM5KCNro9f14Y8oyUxFHTlVvD2zT4d3huroeDSEH LmZtN9uLirDEtnX2tsb9f7mOiFtaf8pOUeZRNkEQjjiiqrRC5JnIi430kPnlS7E1Bghp Bia23tfET3RRHjebrntcZKxo3vDh8sKM24/nyo0dxS12v+xNbFkNIe8jiYpy9h71NUys y8yl0jQFA/2TI4LQyvIpFLQ46K8Ti5fYVqxh4RaAG0VmnTfRd3W4I5sDAc5+AyVppaWC FJew== X-Gm-Message-State: ALoCoQnhTiE7RkBPSPdWLn39YimglWyX+NUV2tEcr+eYvWaMfSOfy2l1w9vLfsQvULEiNg/7DntP X-Received: by 10.152.7.99 with SMTP id i3mr5756laa.9.1420558832675; Tue, 06 Jan 2015 07:40:32 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.100 with SMTP id p4ls60477laj.24.gmail; Tue, 06 Jan 2015 07:40:32 -0800 (PST) X-Received: by 10.112.148.73 with SMTP id tq9mr100557620lbb.37.1420558832513; Tue, 06 Jan 2015 07:40:32 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id sj12si66405479lac.1.2015.01.06.07.40.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Jan 2015 07:40:32 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id pv20so20218750lab.13 for ; Tue, 06 Jan 2015 07:40:32 -0800 (PST) X-Received: by 10.112.180.135 with SMTP id do7mr58426012lbc.23.1420558832423; Tue, 06 Jan 2015 07:40:32 -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 c8csp1209704lbb; Tue, 6 Jan 2015 07:40:31 -0800 (PST) X-Received: by 10.70.47.6 with SMTP id z6mr158710075pdm.82.1420558830530; Tue, 06 Jan 2015 07:40:30 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r11si89605937pdl.210.2015.01.06.07.40.25; Tue, 06 Jan 2015 07:40:30 -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 S1751997AbbAFPkY (ORCPT + 12 others); Tue, 6 Jan 2015 10:40:24 -0500 Received: from mail-pa0-f42.google.com ([209.85.220.42]:40775 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755479AbbAFPkV (ORCPT ); Tue, 6 Jan 2015 10:40:21 -0500 Received: by mail-pa0-f42.google.com with SMTP id et14so31328328pad.1 for ; Tue, 06 Jan 2015 07:40:21 -0800 (PST) X-Received: by 10.70.38.71 with SMTP id e7mr157977945pdk.130.1420558821448; Tue, 06 Jan 2015 07:40:21 -0800 (PST) Received: from localhost ([122.167.212.196]) by mx.google.com with ESMTPSA id u4sm57253562pbs.60.2015.01.06.07.40.20 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 06 Jan 2015 07:40:20 -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 V3 14/16] cpufreq: stats: don't update stats from show_trans_table() Date: Tue, 6 Jan 2015 21:09:13 +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.54 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 66ebdc4c1762..6e87dd9c4083 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -68,7 +68,6 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) ssize_t len = 0; int i, j; - cpufreq_stats_update(stats); len += snprintf(buf + len, PAGE_SIZE - len, " From : To\n"); len += snprintf(buf + len, PAGE_SIZE - len, " : "); for (i = 0; i < stats->state_num; i++) {