lkml.org 
[lkml]   [2019]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 2/3] OPP: Add support for bandwidth OPP tables
On 20-08-19, 15:36, Saravana Kannan wrote:
> On Tue, Aug 20, 2019 at 3:27 PM Saravana Kannan <saravanak@google.com> wrote:
> >
> > On Mon, Aug 19, 2019 at 11:13 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > >
> > > On 07-08-19, 15:31, Saravana Kannan wrote:
>
> > > > + ret = of_property_read_u32(np, "opp-peak-kBps", &bw);
> > > > + if (ret)
> > > > + return ret;
> > > > + new_opp->rate = (unsigned long) bw;
> > > > +
> > > > + ret = of_property_read_u32(np, "opp-avg-kBps", &bw);
> > > > + if (!ret)
> > > > + new_opp->avg_bw = (unsigned long) bw;
> > >
> > > If none of opp-hz/level/peak-kBps are available, print error message here
> > > itself..
> >
> > But you don't print any error for opp-level today. Seems like it's optional?
> >
> > >
> > > > +
> > > > + return 0;
> > >
> > > You are returning 0 on failure as well here.
> >
> > Thanks.
>
> Wait, no. This is not actually a failure. opp-avg-kBps is optional. So
> returning 0 is the right thing to do. If the mandatory properties
> aren't present an error is returned before you get to th end.

You are right :)

--
viresh

\
 
 \ /
  Last update: 2019-08-21 07:25    [W:0.068 / U:4.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site