On Wed, Mar 19, 2014 at 04:04:14PM +0000, Lorenzo Pieralisi wrote:
On Wed, Mar 05, 2014 at 08:59:33AM +0000, Mark Brown wrote:
if (leaf) {
ret = parse_core(c, cluster_id, core_id++);
if (ret != 0) {
Should remove braces.
return ret;
}
} else {
They're there because it's nested inside another if statement with braces - yes, there is indentation but it still helps.
+void __init init_cpu_topology(void) +{
- int ret;
- reset_cpu_topology();
- ret = parse_dt_topology();
- if (ret != 0)
reset_cpu_topology();
ret is unused so should be removed. You could remove the first reset call and
I'm sorry, I don't follow? The use is quoted above...
use static initialization for that, it is a matter of taste though.
Static initialisation can't cover the calls to set_power_scale() and having a different thing for default and unwinding cases seems likely to be error prone.
A comment is in order, whatever approach you go for.
I'm not sure what the confusion is here so I don't know what a comment would clarify. Could you say what it is you find confusing please?