Re: [PATCH] opp: of: drop incorrect lockdep_assert_held()

2019-10-23 Thread Niklas Cassel
On Wed, Oct 23, 2019 at 11:00:05AM +0530, Viresh Kumar wrote:
> On 10-10-19, 16:00, Viresh Kumar wrote:
> > _find_opp_of_np() doesn't traverse the list of OPP tables but instead
> > just the entries within an OPP table and so only requires to lock the
> > OPP table itself.
> > 
> > The lockdep_assert_held() was added there by mistake and isn't really
> > required.
> > 
> > Fixes: 5d6d106fa455 ("OPP: Populate required opp tables from 
> > "required-opps" property")
> > Cc: v5.0+  # v5.0+
> > Reported-by: Niklas Cassel 
> > Signed-off-by: Viresh Kumar 
> > ---
> >  drivers/opp/of.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/opp/of.c b/drivers/opp/of.c
> > index 1813f5ad5fa2..6dc41faf74b5 100644
> > --- a/drivers/opp/of.c
> > +++ b/drivers/opp/of.c
> > @@ -77,8 +77,6 @@ static struct dev_pm_opp *_find_opp_of_np(struct 
> > opp_table *opp_table,
> >  {
> > struct dev_pm_opp *opp;
> >  
> > -   lockdep_assert_held(_table_lock);
> > -
> > mutex_lock(_table->lock);
> >  
> > list_for_each_entry(opp, _table->opp_list, node) {
> 
> @Niklas, any inputs from your side  here would be appreciated :)

Tested-by: Niklas Cassel 

After this patch, there is still a single lockdep_assert_held()
left, inside _find_table_of_opp_np(), since you kept this,
I assume that that one is still needed?

Kind regards,
Niklas


Re: [PATCH] opp: of: drop incorrect lockdep_assert_held()

2019-10-22 Thread Viresh Kumar
On 10-10-19, 16:00, Viresh Kumar wrote:
> _find_opp_of_np() doesn't traverse the list of OPP tables but instead
> just the entries within an OPP table and so only requires to lock the
> OPP table itself.
> 
> The lockdep_assert_held() was added there by mistake and isn't really
> required.
> 
> Fixes: 5d6d106fa455 ("OPP: Populate required opp tables from "required-opps" 
> property")
> Cc: v5.0+  # v5.0+
> Reported-by: Niklas Cassel 
> Signed-off-by: Viresh Kumar 
> ---
>  drivers/opp/of.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/opp/of.c b/drivers/opp/of.c
> index 1813f5ad5fa2..6dc41faf74b5 100644
> --- a/drivers/opp/of.c
> +++ b/drivers/opp/of.c
> @@ -77,8 +77,6 @@ static struct dev_pm_opp *_find_opp_of_np(struct opp_table 
> *opp_table,
>  {
>   struct dev_pm_opp *opp;
>  
> - lockdep_assert_held(_table_lock);
> -
>   mutex_lock(_table->lock);
>  
>   list_for_each_entry(opp, _table->opp_list, node) {

@Niklas, any inputs from your side  here would be appreciated :)

-- 
viresh