[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOh2x==FUO32YJeP3veLmkSKv4a_75oxKnyRWa9HzqWLgngknQ@mail.gmail.com>
Date: Fri, 23 Feb 2018 11:05:01 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Eduardo Valentin <edubezval@...il.com>, kevin.wangtao@...aro.org,
Leo Yan <leo.yan@...aro.org>,
Vincent Guittot <vincent.guittot@...aro.org>,
amit.kachhap@...il.com,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
javi.merino@...nel.org, Zhang Rui <rui.zhang@...el.com>,
daniel.thompson@...aro.org,
Linux PM list <linux-pm@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>
Subject: Re: [PATCH V2 7/7] cpuidle/drivers/cpuidle-arm: Register the cooling device
On Wed, Feb 21, 2018 at 8:59 PM, Daniel Lezcano
<daniel.lezcano@...aro.org> wrote:
> Register the ARM generic cpuidle driver as a cooling device.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> ---
> drivers/cpuidle/cpuidle-arm.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/cpuidle/cpuidle-arm.c b/drivers/cpuidle/cpuidle-arm.c
> index ddee1b6..c100915 100644
> --- a/drivers/cpuidle/cpuidle-arm.c
> +++ b/drivers/cpuidle/cpuidle-arm.c
> @@ -11,6 +11,7 @@
>
> #define pr_fmt(fmt) "CPUidle arm: " fmt
>
> +#include <linux/cpu_cooling.h>
> #include <linux/cpuidle.h>
> #include <linux/cpumask.h>
> #include <linux/cpu_pm.h>
> @@ -172,6 +173,10 @@ static int __init arm_idle_init(void)
> goto out_fail;
> }
>
> + ret = cpuidle_cooling_register();
> + if (ret)
> + pr_warn("Failed to register the cpuidle cooling device\n");
> +
Because you aren't going to use the return value here, it might be better
to change return type of cpuidle_cooling_register() as "void" and do
error printing from within that routine.
Powered by blists - more mailing lists