From patchwork Tue Aug 6 13:38:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18799 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 730E525DF6 for ; Tue, 6 Aug 2013 13:38:26 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id 15sf461524vea.9 for ; Tue, 06 Aug 2013 06:38:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=BATd6gzbml9gWjt7WujJb2XDE+e42cJZVymrj6M0XG0=; b=fWUf4QdujxWW8gHhCQCA+gCCNHPP4NPgqOICuW+eXhshiKAsW2VkYRRzsUBMzk09+u m++C7htmS+Q4A2mTwOGkVZ0VYHeAtmXc6iqn0RnfPC01/D20/l7YMEXSyuYNc+OavhyZ gpE+oIv5nk3MiBA0Ht6ikvWqLCXWxe5STfNOs9Ip8C/9BGf8MtIoSQs4YiU/sO93uHYh fFG3M8MNlpo+eYl1yGW8rDy4+tIV1iL6+Cgr0uGUYo5euYzKXa613Swxa/OPuCtVeSWW yuK9JA7VpZzRIzZ3KjyuKthZda5uxKR3en63xA0xtCUUPaJXahXh3u/0ys5ioPzi1/Jk JFtg== X-Received: by 10.236.156.33 with SMTP id l21mr481104yhk.18.1375796306155; Tue, 06 Aug 2013 06:38:26 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.1.78 with SMTP id 14ls212858qek.57.gmail; Tue, 06 Aug 2013 06:38:26 -0700 (PDT) X-Received: by 10.58.171.4 with SMTP id aq4mr386146vec.26.1375796305999; Tue, 06 Aug 2013 06:38:25 -0700 (PDT) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id se5si289191vdc.36.2013.08.06.06.38.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Aug 2013 06:38:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.48; Received: by mail-vb0-f48.google.com with SMTP id w16so369884vbf.7 for ; Tue, 06 Aug 2013 06:38:25 -0700 (PDT) X-Gm-Message-State: ALoCoQkqZo6R/s/YDRK//2GxlI02nLOPFr60gSvQ4gpe69oHlZ+0ByiFGxqFhj6JLkw4kIWAno2o X-Received: by 10.52.117.208 with SMTP id kg16mr330029vdb.48.1375796305846; Tue, 06 Aug 2013 06:38:25 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.11.8 with SMTP id pc8csp146194vcb; Tue, 6 Aug 2013 06:38:25 -0700 (PDT) X-Received: by 10.182.76.38 with SMTP id h6mr997093obw.74.1375796305262; Tue, 06 Aug 2013 06:38:25 -0700 (PDT) Received: from mail-oa0-f53.google.com (mail-oa0-f53.google.com [209.85.219.53]) by mx.google.com with ESMTPS id l9si916706obv.148.2013.08.06.06.38.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 Aug 2013 06:38:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.219.53 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.219.53; Received: by mail-oa0-f53.google.com with SMTP id k18so668962oag.26 for ; Tue, 06 Aug 2013 06:38:24 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.60.115.199 with SMTP id jq7mr1076698oeb.19.1375796304879; Tue, 06 Aug 2013 06:38:24 -0700 (PDT) Received: by 10.182.28.168 with HTTP; Tue, 6 Aug 2013 06:38:24 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 Aug 2013 19:08:24 +0530 Message-ID: Subject: Re: [PATCH 03/10] cpufreq: Give consistent names for struct cpufreq_policy * From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, srivatsa.bhat@linux.vnet.ibm.com, l.majewski@samsung.com, Viresh Kumar X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 3 August 2013 17:19, Viresh Kumar wrote: > They are named as policy, cur_policy, new_policy, data, etc.. Just name them > poicy wherever possible. > > Signed-off-by: Viresh Kumar > --- > drivers/cpufreq/cpufreq.c | 200 ++++++++++++++++++------------------- > drivers/cpufreq/cpufreq_governor.h | 2 +- > drivers/cpufreq/cpufreq_ondemand.c | 10 +- > drivers/cpufreq/cpufreq_stats.c | 14 +-- > include/linux/cpufreq.h | 2 +- > 5 files changed, 111 insertions(+), 117 deletions(-) Another Fixup :) @Rafael: Apart from that I found things to be pretty stable now and so I can go ahead with the V2 of this patchset.. And then maybe we can get in linux-next so it receives some testing before 3.12. if (per_cpu(cpufreq_stats_table, cpu)) @@ -203,13 +203,13 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy, if ((stat) == NULL) return -ENOMEM; - data = cpufreq_cpu_get(cpu); - if (data == NULL) { + current_policy = cpufreq_cpu_get(cpu); + if (current_policy == NULL) { ret = -EINVAL; goto error_get_fail; } - ret = sysfs_create_group(&data->kobj, &stats_attr_group); + ret = sysfs_create_group(¤t_policy->kobj, &stats_attr_group); if (ret) goto error_out; @@ -252,10 +252,10 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy, stat->last_time = get_jiffies_64(); stat->last_index = freq_table_get_index(stat, policy->cur); spin_unlock(&cpufreq_stats_lock); - cpufreq_cpu_put(data); + cpufreq_cpu_put(current_policy); return 0; error_out: - cpufreq_cpu_put(data); + cpufreq_cpu_put(current_policy); error_get_fail: kfree(stat); per_cpu(cpufreq_stats_table, cpu) = NULL; diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 1e630d0..7461a88 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -194,7 +194,7 @@ static int cpufreq_stats_create_table(struct cpufreq_policy *policy, { unsigned int i, j, count = 0, ret = 0; struct cpufreq_stats *stat; - struct cpufreq_policy *data; + struct cpufreq_policy *current_policy; unsigned int alloc_size; unsigned int cpu = policy->cpu;