mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Viresh Kumar <viresh.kumar@linaro.org>
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
Subject: Re: [PATCH 03/10] cpufreq: Give consistent names for struct cpufreq_policy *
Date: Tue, 06 Aug 2013 16:02:37 +0200	[thread overview]
Message-ID: <2873799.lFo4PWMlur@vostro.rjw.lan> (raw)
In-Reply-To: <CAKohpon5mUOTt+4Mh5V4+abq0dJQH0MQyc2dAR4kKMjbuytRvw@mail.gmail.com>

On Tuesday, August 06, 2013 07:08:24 PM Viresh Kumar wrote:
> On 3 August 2013 17:19, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > They are named as policy, cur_policy, new_policy, data, etc.. Just name them
> > poicy wherever possible.
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> >  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.

Yes, please submit.

Thanks,
Rafael


> 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;
>         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(&current_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;
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-08-06 13:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-03 11:49 [PATCH 00/10] CPUFreq: Fixes & Cleanups for 3.12 Viresh Kumar
2013-08-03 11:49 ` [PATCH 01/10] cpufreq: Cleanup header files included in core Viresh Kumar
2013-08-03 17:15   ` Viresh Kumar
2013-08-03 21:42     ` Rafael J. Wysocki
2013-08-03 11:49 ` [PATCH 02/10] cpufreq: Re-arrange declarations in cpufreq.h Viresh Kumar
2013-08-03 17:13   ` Viresh Kumar
2013-08-03 21:43     ` Rafael J. Wysocki
2013-08-03 11:49 ` [PATCH 03/10] cpufreq: Give consistent names for struct cpufreq_policy * Viresh Kumar
2013-08-06 13:38   ` Viresh Kumar
2013-08-06 14:02     ` Rafael J. Wysocki [this message]
2013-08-03 11:49 ` [PATCH 04/10] cpufreq: Use sizeof(*ptr) form for finding size of a struct Viresh Kumar
2013-08-03 11:49 ` [PATCH 05/10] cpufreq: Pass policy to cpufreq_add_policy_cpu() Viresh Kumar
2013-08-03 11:49 ` [PATCH 06/10] cpufreq: Store cpufreq policies in a list Viresh Kumar
2013-08-03 11:49 ` [PATCH 07/10] cpufreq: Use cpufreq_policy_list for iterating over policies Viresh Kumar
2013-08-03 11:49 ` [PATCH 08/10] cpufreq: Fix broken usage of governor->owner's refcount Viresh Kumar
2013-08-03 12:08   ` Rafael J. Wysocki
2013-08-03 13:27     ` Viresh Kumar
2013-08-03 22:06       ` Rafael J. Wysocki
2013-08-03 11:49 ` [PATCH 09/10] cpufreq: Don't use cpufreq_driver->owner's refcount to protect critical sections Viresh Kumar
2013-08-03 11:49 ` [PATCH 10/10] cpufreq: Remove struct cpufreq_driver's owner field Viresh Kumar
2013-08-03 12:07 ` [PATCH 00/10] CPUFreq: Fixes & Cleanups for 3.12 Rafael J. Wysocki
2013-08-03 13:28   ` Viresh Kumar
2013-08-03 22:02     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2873799.lFo4PWMlur@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=cpufreq@vger.kernel.org \
    --cc=l.majewski@samsung.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®