Re: [PATCH 2/7] cpufreq: Drop cpufreq_policy_restore()

From: Viresh Kumar
Date: Mon Jul 27 2015 - 10:49:05 EST


On 27-07-15, 16:03, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> Notice that when cpufreq_policy_restore() is called, its per-CPU
> cpufreq_cpu_data variable has been already dereferenced and if that
> variable is not NULL, the policy local pointer in cpufreq_add_dev()
> contains its value.
>
> Therefore it is not necessary to dereference it again and the
> policy pointer can be used directly. Moreover, if that pointer
> is not NULL, the policy is inactive (or the previous check would
> have made us return from cpufreq_add_dev()) so the restoration
> code from cpufreq_policy_restore() can be moved to that point
> in cpufreq_add_dev().
>
> Do that and drop cpufreq_policy_restore().
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> ---
> drivers/cpufreq/cpufreq.c | 44 +++++++++++---------------------------------
> 1 file changed, 11 insertions(+), 33 deletions(-)

Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/