From patchwork Fri Jan 2 05:46:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 42665 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 CECEB26CB5 for ; Fri, 2 Jan 2015 05:47:33 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf10356852eek.9 for ; Thu, 01 Jan 2015 21:47:33 -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=rIX/gzHxlwUYdMTU2XMn+B2b77GAwQOjW4JB78XZlPs=; b=IcGrK3ZxgRi3yyh6Q1kAgQMvrrxHEqdaXCbLToNkiIHn2DkEPJYFsg3DrYYtzZ6c64 0iV9v96B0vgGdiwbvwuprNqHDQ6EXjnGfuNylb0fxxYL7SSl/VOfY2CRm1yD6uTA7r5n LkvZdDxzci6osI5gHPh4pRDQptd/5EJqRWv7Zz18kQEcQMEIRvdTCZBXwyYS3QcUadNM HUtD+xLJKg3zhTzwmlSsfocBZrpBDLs0kYgfD3/PfzRJDecAQu74KqYQxyZUlM0o0wAg qRWREQl87llgCf3nHBrIm6FtQY94586i4dhLIReP5BEivzdSFb9bqDNo6iswfTvwsYdm qbzQ== X-Gm-Message-State: ALoCoQngXilzVK8rYRYT9CflhObBPML3xhMV8vfUxH0ol4dSq0/xsvM6/NhbZpILYta4Pp6l3kbi X-Received: by 10.112.137.70 with SMTP id qg6mr3670lbb.14.1420177653022; Thu, 01 Jan 2015 21:47:33 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.66 with SMTP id 2ls1911778lak.10.gmail; Thu, 01 Jan 2015 21:47:32 -0800 (PST) X-Received: by 10.112.72.197 with SMTP id f5mr51095637lbv.21.1420177652741; Thu, 01 Jan 2015 21:47:32 -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 or4si50340352lbb.22.2015.01.01.21.47.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 21:47:32 -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 gf13so15418811lab.35 for ; Thu, 01 Jan 2015 21:47:32 -0800 (PST) X-Received: by 10.152.234.35 with SMTP id ub3mr74978649lac.70.1420177652617; Thu, 01 Jan 2015 21:47: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 c8csp114483lbb; Thu, 1 Jan 2015 21:47:31 -0800 (PST) X-Received: by 10.66.184.48 with SMTP id er16mr118528410pac.61.1420177650812; Thu, 01 Jan 2015 21:47:30 -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.29; Thu, 01 Jan 2015 21:47: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 S1750727AbbABFr3 (ORCPT + 12 others); Fri, 2 Jan 2015 00:47:29 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:56276 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbbABFr2 (ORCPT ); Fri, 2 Jan 2015 00:47:28 -0500 Received: by mail-pa0-f41.google.com with SMTP id rd3so23665169pab.28 for ; Thu, 01 Jan 2015 21:47:28 -0800 (PST) X-Received: by 10.70.50.41 with SMTP id z9mr119564576pdn.31.1420177648126; Thu, 01 Jan 2015 21:47:28 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id rb5sm9191438pab.14.2015.01.01.21.47.26 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 21:47:27 -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 07/14] cpufreq: stats: remove cpufreq_stats_update_policy_cpu() Date: Fri, 2 Jan 2015 11:16:44 +0530 Message-Id: <53e8e4e9a40d2759ebdecfe4649f9ecee112a330.1420177186.git.viresh.kumar@linaro.org> 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_policy_cpu() doesn't do any useful stuff anymore and must be removed. Along with it, also remove 'cpu' field from 'struct cpufreq_stats' as that isn't used as well. Reviewed-by: Prarit Bhargava Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_stats.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 106c89ccef30..f458fdbc5bfd 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -18,7 +18,6 @@ static spinlock_t cpufreq_stats_lock; struct cpufreq_stats { - unsigned int cpu; unsigned int total_trans; unsigned long long last_time; unsigned int max_state; @@ -194,7 +193,6 @@ static int __cpufreq_stats_create_table(struct cpufreq_policy *policy) if (ret) goto error_out; - stat->cpu = cpu; policy->stats_data = stat; cpufreq_for_each_valid_entry(pos, table) @@ -251,24 +249,12 @@ static void cpufreq_stats_create_table(unsigned int cpu) cpufreq_cpu_put(policy); } -static void cpufreq_stats_update_policy_cpu(struct cpufreq_policy *policy) -{ - struct cpufreq_stats *stat = policy->stats_data; - - stat->cpu = policy->cpu; -} - static int cpufreq_stat_notifier_policy(struct notifier_block *nb, unsigned long val, void *data) { int ret = 0; struct cpufreq_policy *policy = data; - if (val == CPUFREQ_UPDATE_POLICY_CPU) { - cpufreq_stats_update_policy_cpu(policy); - return 0; - } - if (val == CPUFREQ_CREATE_POLICY) ret = __cpufreq_stats_create_table(policy); else if (val == CPUFREQ_REMOVE_POLICY)