[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aa059103-c404-0dc2-f332-e2ea7ddb1c5e@linaro.org>
Date: Fri, 13 Apr 2018 13:46:07 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Daniel Thompson <daniel.thompson@...aro.org>
Cc: viresh.kumar@...aro.org, edubezval@...il.com,
kevin.wangtao@...aro.org, leo.yan@...aro.org,
vincent.guittot@...aro.org, linux-kernel@...r.kernel.org,
javi.merino@...nel.org, rui.zhang@...el.com,
linux-pm@...r.kernel.org,
Amit Daniel Kachhap <amit.kachhap@...il.com>
Subject: Re: [PATCH v3 6/7] thermal/drivers/cpu_cooling: Introduce the cpu
idle cooling driver
On 13/04/2018 13:38, Daniel Thompson wrote:
[ ... ]
>> + /*
>> + * Allocate the cpuidle cooling device with the list
>> + * of the cpus belonging to the cluster.
>> + */
>> + idle_cdev = cpuidle_cooling_alloc(topology_core_cpumask(cpu));
>> + if (!idle_cdev)
>> + goto out;
>
> Perhaps nitpicking but it might be better to set ret to -ENOMEM here
> and avoid initializing it during the declarations.
>
> There's no bug in the current form since ret is never assigned to
> outside of the error paths, but the unwritten assumption that ret keeps
> its original value throughout the loop seems like a bit of a landmine
> w.r.t. future maintainance.
Agree.
--
<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
Powered by blists - more mailing lists