[PATCH 3/3] cpufreq: stats: Refactor common code into __cpufreq_stats_create_table()
Viresh Kumar
viresh.kumar at linaro.org
Thu Feb 27 00:39:45 EST 2014
On 27 February 2014 01:47, Saravana Kannan <skannan at codeaurora.org> wrote:
> cpufreq_frequency_get_table() is called from all callers of
> __cpufreq_stats_create_table(). So, move it inside.
>
> Suggested-by: Viresh Kumar <viresh.kumar at linaro.org>
> Signed-off-by: Saravana Kannan <skannan at codeaurora.org>
> ---
> drivers/cpufreq/cpufreq_stats.c | 22 +++++++++-------------
> 1 file changed, 9 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
> index c52b440..9d9e366 100644
> --- a/drivers/cpufreq/cpufreq_stats.c
> +++ b/drivers/cpufreq/cpufreq_stats.c
> @@ -180,13 +180,18 @@ static void cpufreq_stats_free_table(unsigned int cpu)
> cpufreq_cpu_put(policy);
> }
>
> -static int __cpufreq_stats_create_table(struct cpufreq_policy *policy,
> - struct cpufreq_frequency_table *table)
> +static int __cpufreq_stats_create_table(struct cpufreq_policy *policy)
> {
> unsigned int i, j, count = 0, ret = 0;
> struct cpufreq_stats *stat;
> unsigned int alloc_size;
> unsigned int cpu = policy->cpu;
> + struct cpufreq_frequency_table *table;
> +
> + table = cpufreq_frequency_get_table(policy->cpu);
s/policy->cpu/cpu
Otherwise, Acked-by: Viresh Kumar <viresh.kumar at linaro.org>
More information about the linux-arm-kernel
mailing list