lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 06 Aug 2013 16:02:37 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	linaro-kernel@...ts.linaro.org, patches@...aro.org,
	cpufreq@...r.kernel.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, srivatsa.bhat@...ux.vnet.ibm.com,
	l.majewski@...sung.com
Subject: Re: [PATCH 03/10] cpufreq: Give consistent names for struct cpufreq_policy *

On Tuesday, August 06, 2013 07:08:24 PM Viresh Kumar wrote:
> On 3 August 2013 17:19, Viresh Kumar <viresh.kumar@...aro.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@...aro.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ