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, 21 May 2014 10:48:48 +0100
From:	Sudeep Holla <sudeep.holla@....com>
To:	Viresh Kumar <viresh.kumar@...aro.org>
CC:	Sudeep Holla <sudeep.holla@....com>,
	"rjw@...ysocki.net" <rjw@...ysocki.net>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Arvind Chauhan <Arvind.Chauhan@....com>,
	"inderpal.s@...sung.com" <inderpal.s@...sung.com>,
	"pavel@....cz" <pavel@....cz>, "nm@...com" <nm@...com>,
	"chander.kashyap@...aro.org" <chander.kashyap@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Amit Daniel Kachhap <amit.daniel@...sung.com>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Shawn Guo <shawn.guo@...aro.org>
Subject: Re: [PATCH Resend] driver/core: cpu: initialize opp table



On 21/05/14 10:41, Viresh Kumar wrote:
> On 21 May 2014 15:05, Sudeep Holla <sudeep.holla@....com> 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 :)
>

I believe so, mainly the non-DT case, since you are checking for error, it will
end up with spurious messages as the return value is -EINVAL. Hence I was
suggesting return -ENOSYS(which means Function not implemented)

> Why do we need to return anything? Let that function have return type 'void'?

Hmm, don't we still need to throw error if DT has invalid OPP ?
It doesn't may sense to me if no errors is returned and still CPUFreq fails
later.

> Also would it make sense to move this into it as well?
>
> cpu->dev.of_node = of_get_cpu_node(num, NULL);
>

I don't quite understand what you mean here ?

Regards,
Sudeep

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ