lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Apr 2018 11:29:53 +0200
From:   Daniel Lezcano <daniel.lezcano@...aro.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>
Cc:     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,
        daniel.thompson@...aro.org, 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


Hi Viresh,

thanks for the review.


On 11/04/2018 10:51, Viresh Kumar wrote:

[ ... ]

>> +void __init cpuidle_cooling_register(void)
>> +{
>> +	struct cpuidle_cooling_device *idle_cdev = NULL;
>> +	struct thermal_cooling_device *cdev;
>> +	struct device_node *np;
>> +	cpumask_var_t cpumask;
> 
> maybe call it clustermask ?

Yeah, sounds better.

>> +		cdev = thermal_of_cooling_device_register(np, dev_name,
>> +							  idle_cdev,
>> +							  &cpuidle_cooling_ops);
>> +		if (IS_ERR(cdev)) {
>> +			ret = PTR_ERR(cdev);
>> +			goto out;
>> +		}
>> +
>> +		idle_cdev->cdev = cdev;
>> +		cpumask_set_cpu(cluster_id, cpumask);
>> +	}
>> +
>> +	ret = smpboot_register_percpu_thread(&cpuidle_cooling_threads);
>> +	if (ret)
>> +		goto out;
>> +
>> +	pr_info("Created cpuidle cooling device\n");
>> +out:
>> +	free_cpumask_var(cpumask);
>> +
>> +	if (ret) {
>> +		cpuidle_cooling_unregister();
>> +		pr_err("Failed to create idle cooling device (%d)\n", ret);
>> +	}
> 
> Maybe rearrange it a bit:
> 
> +	ret = smpboot_register_percpu_thread(&cpuidle_cooling_threads);
> +
> +out:
> +	if (ret) {
> +		cpuidle_cooling_unregister();
> +		pr_err("Failed to create idle cooling device (%d)\n", ret);
> +	} else {
> +	        pr_info("Created cpuidle cooling devices\n");
> +       }
> +
> +	free_cpumask_var(cpumask);
> 
> ??

I usually tend to avoid using 'else' statements when possible (a coding
style practice) but if you prefer this version I'm fine with that.



-- 
 <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

Powered by Openwall GNU/*/Linux Powered by OpenVZ