Re: [PATCH Resend] driver/core: cpu: initialize opp table

From: Viresh Kumar
Date: Wed May 21 2014 - 05:42:04 EST


On 21 May 2014 15:05, Sudeep Holla <sudeep.holla@xxxxxxx> wrote:
> As Rafael mentioned it's better to have a wrapper function to hide these
> details. You should consider the fact that of_init_opp_table returns -EINVAL
> if
> CONFIG_PM_OPP not defined as well as when the list is invalid in the DT.
> IMO we can return -ENOSYS if not implemented(i.e. !CONFIG_PM_OPP)

I didn't understood Rafael's comment as I couldn't figure out if he is just
pointing to CONFIG_** or some arch specific thing..

But it looks more obvious that he asked me something similar to what you
are saying :)

Why do we need to return anything? Let that function have return type 'void'?
Also would it make sense to move this into it as well?

cpu->dev.of_node = of_get_cpu_node(num, NULL);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/