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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpon5mUOTt+4Mh5V4+abq0dJQH0MQyc2dAR4kKMjbuytRvw@mail.gmail.com>
Date:	Tue, 6 Aug 2013 19:08:24 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	rjw@...k.pl
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, Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 03/10] cpufreq: Give consistent names for struct
 cpufreq_policy *

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.

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;
--
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