[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpoknoFuz8qnDpunA7oxr5E_18=+EQsFEy0P39fcU=4Ps9w@mail.gmail.com>
Date: Tue, 20 May 2014 09:30:02 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Nishanth Menon <nm@...com>
Cc: Chander Kashyap <chander.kashyap@...aro.org>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Pavel Machek <pavel@....cz>,
"Brown, Len" <len.brown@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Chander Kashyap <k.chander@...sung.com>,
Inderpal Singh <inderpal.s@...sung.com>
Subject: Re: [PATCH v3] PM / OPP: discard duplicate OPPs
On 19 May 2014 18:38, Nishanth Menon <nm@...com> wrote:
>> + if (new_opp->rate == opp->rate) {
>> + mutex_unlock(&dev_opp_list_lock);
>> + kfree(new_opp);
>> + return 0;
>
> IF we decide on ensuring that the OPP additions are done one time[1] -
Fingers crossed :)
But that doesn't mean we covered everything. First of all platforms can
still add OPPs directly and then there are other OPPs than CPU's.
> then returning -EEXIST is appropriate here. we want to be able to
> catch warnings of sequencing errors, and returning 0 is not the way to
> do it.
I have asked this on the earlier thread as well, let me ask it again.
What would callers do on return value of EEXIST ? Is there anything
special we may want to handle ?
Yes, we shouldn't fix everything silently and so a pr_warn() can/should
be added here. But returning is zero is better in order not to complicate
error handling at callers side.
Isn't it ?
--
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