lkml.org 
[lkml]   [2018]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 3/5] PM / Domains: Save OPP table pointer in genpd
On 30-11-18, 09:53, Ulf Hansson wrote:
> > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> > index 8e554e6a82a2..0d928359b880 100644
> > --- a/drivers/base/power/domain.c
> > +++ b/drivers/base/power/domain.c
> > @@ -1907,12 +1907,21 @@ int of_genpd_add_provider_simple(struct device_node *np,
> > ret);
> > goto unlock;
> > }
> > +
> > + /*
> > + * Save table for faster processing while setting performance
> > + * state.
> > + */
> > + genpd->opp_table = dev_pm_opp_get_opp_table(&genpd->dev);
> > + WARN_ON(!genpd->opp_table);
>
> The WARN_ON seems lazy. Why not implement a proper error path?

We just added the table before this call and so we should get the table no
matter what. Initially I wanted to add a BUG_ON() but then I relaxed it a bit :)

There is no point of error path here as that will never run.

--
viresh

\
 
 \ /
  Last update: 2018-11-30 10:05    [W:0.056 / U:12.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site