Re: [PATCH V5] PM/OPP: discard duplicate OPPs

2014-05-21 Thread Viresh Kumar
On 22 May 2014 05:18, Rafael J. Wysocki wrote: > The case in which we want to return 0. Never mind, it's OK. Ahh yes, It was wrong earlier and fixed during this patch only :) > The parens are still not necessary, though. Already got rid of them and so didn't bother replying :) -- To unsubscrib

Re: [PATCH V5] PM/OPP: discard duplicate OPPs

2014-05-21 Thread Rafael J. Wysocki
On Wednesday, May 21, 2014 09:33:42 AM Viresh Kumar wrote: > On 21 May 2014 02:39, Rafael J. Wysocki wrote: > >> + /* Duplicate OPPs ? */ > >> + if (new_opp->rate == opp->rate) { > >> + int ret = (new_opp->u_volt == opp->u_volt) && opp->available > >> ? > >> +

Re: [PATCH V5] PM/OPP: discard duplicate OPPs

2014-05-20 Thread Viresh Kumar
On 21 May 2014 02:39, Rafael J. Wysocki wrote: >> + /* Duplicate OPPs ? */ >> + if (new_opp->rate == opp->rate) { >> + int ret = (new_opp->u_volt == opp->u_volt) && opp->available ? >> + 0 : -EEXIST; > > The parens are not necessary. And is the direction co

Re: [PATCH V5] PM/OPP: discard duplicate OPPs

2014-05-20 Thread Rafael J. Wysocki
On Tuesday, May 20, 2014 08:23:28 PM Viresh Kumar wrote: > From: Chander Kashyap > > We don't have any protection against addition of duplicate OPPs currently and > in case some code tries to add them it will end up corrupting OPP tables. > > There can be many combinations in which we may end up

Re: [PATCH V5] PM/OPP: discard duplicate OPPs

2014-05-20 Thread Nishanth Menon
On 05/20/2014 09:53 AM, Viresh Kumar wrote: > From: Chander Kashyap > > We don't have any protection against addition of duplicate OPPs currently and > in case some code tries to add them it will end up corrupting OPP tables. > > There can be many combinations in which we may end up trying dupli

[PATCH V5] PM/OPP: discard duplicate OPPs

2014-05-20 Thread Viresh Kumar
From: Chander Kashyap We don't have any protection against addition of duplicate OPPs currently and in case some code tries to add them it will end up corrupting OPP tables. There can be many combinations in which we may end up trying duplicate OPPs: - both freq and volt are same, but earlier OP