lkml.org 
[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/6] cpufreq: Use existing stub functions instead of IS_ENABLED macro
From
Date

Hi Viresh,

On 21/06/2019 15:22, Daniel Lezcano wrote:
> The functions stub already exist for the condition the IS_ENABLED
> is trying to avoid.
>
> Remove the IS_ENABLED macros as they are pointless.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

what about this one?

> ---
> drivers/cpufreq/cpufreq.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 85ff958e01f1..7c72f7d3509c 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1378,8 +1378,7 @@ static int cpufreq_online(unsigned int cpu)
> if (cpufreq_driver->ready)
> cpufreq_driver->ready(policy);
>
> - if (IS_ENABLED(CONFIG_CPU_THERMAL) &&
> - cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV)
> + if (cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV)
> policy->cdev = of_cpufreq_cooling_register(policy);
>
> pr_debug("initialization complete\n");
> @@ -1469,8 +1468,7 @@ static int cpufreq_offline(unsigned int cpu)
> goto unlock;
> }
>
> - if (IS_ENABLED(CONFIG_CPU_THERMAL) &&
> - cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) {
> + if (cpufreq_driver->flags & CPUFREQ_IS_COOLING_DEV) {
> cpufreq_cooling_unregister(policy->cdev);
> policy->cdev = NULL;
> }
>


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2019-06-24 10:54    [W:0.122 / U:34.556 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site