lkml.org 
[lkml]   [2016]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 3/10] cpufreq: governor: Avoid passing dbs_data pointers around unnecessarily
On 05-02-16, 03:15, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Do not pass struct dbs_data pointers to the family of functions
> implementing governor operations in cpufreq_governor.c as they can
> take that pointer from policy->governor by themselves.
>
> The cpufreq_governor_init() case is slightly more complicated, since
> policy->governor may be NULL when it is invoked, but then it can reach
> the pointer in question via its cdata argument just fine.
>
> While at it, rework cpufreq_governor_dbs() to avoid a pointless
> policy_governor check in the CPUFREQ_GOV_POLICY_INIT case.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/cpufreq/cpufreq_governor.c | 68 ++++++++++++++-----------------------
> 1 file changed, 27 insertions(+), 41 deletions(-)

Took some time to review, but it looks nice cleanup :)

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

--
viresh

\
 
 \ /
  Last update: 2016-02-05 09:01    [W:0.570 / U:2.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site