From: Walter Lozano <walter.lozano@collabora.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org, kernel@collabora.com,
Nishanth Menon <nm@ti.com>, Stephen Boyd <sboyd@kernel.org>,
Viresh Kumar <vireshk@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] opp: Increase parsed_static_opps on _of_add_opp_table_v1
Date: Thu, 16 Jul 2020 09:57:37 -0300 [thread overview]
Message-ID: <34634b9e-2f6f-d8d8-ccf3-39841301cd65@collabora.com> (raw)
In-Reply-To: <20200716032259.l5ybqetpg74ybogh@vireshk-i7>
Hi Viresh,
On 16/7/20 00:22, Viresh Kumar wrote:
> On 15-07-20, 23:54, Walter Lozano wrote:
>> Currently, when using _of_add_opp_table_v2 parsed_static_opps is
>> increased and this value is used on _opp_remove_all_static to
>> check if there are static opps entries that need to be freed.
>> Unfortunately this does not happens when using _of_add_opp_table_v1,
>> which leads to warnings.
>>
>> This patch increases parsed_static_opps on _of_add_opp_table_v1 in a
>> similar way as in _of_add_opp_table_v2.
>>
>> Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
>> ---
>>
>> drivers/opp/of.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/opp/of.c b/drivers/opp/of.c
>> index 9a5873591a40..b2bc82bf8b42 100644
>> --- a/drivers/opp/of.c
>> +++ b/drivers/opp/of.c
>> @@ -917,6 +917,8 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
>> nr -= 2;
>> }
>>
>> + opp_table->parsed_static_opps++;
>> +
>> return ret;
>> }
> Merged with this and added relevant Fixes and stable tags.
Thanks for apply the proper fix.
>
> diff --git a/drivers/opp/of.c b/drivers/opp/of.c
> index b2bc82bf8b42..314f306140a1 100644
> --- a/drivers/opp/of.c
> +++ b/drivers/opp/of.c
> @@ -902,6 +902,10 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
> return -EINVAL;
> }
>
> + mutex_lock(&opp_table->lock);
> + opp_table->parsed_static_opps = 1;
> + mutex_unlock(&opp_table->lock);
> +
> val = prop->value;
> while (nr) {
> unsigned long freq = be32_to_cpup(val++) * 1000;
> @@ -917,8 +921,6 @@ static int _of_add_opp_table_v1(struct device *dev, struct opp_table *opp_table)
> nr -= 2;
> }
>
> - opp_table->parsed_static_opps++;
> -
> return ret;
> }
>
prev parent reply other threads:[~2020-07-16 12:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-16 2:54 Walter Lozano
2020-07-16 3:22 ` Viresh Kumar
2020-07-16 12:57 ` Walter Lozano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34634b9e-2f6f-d8d8-ccf3-39841301cd65@collabora.com \
--to=walter.lozano@collabora.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=nm@ti.com \
--cc=sboyd@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®