From: Sumit Gupta <sumitg@nvidia.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: <rafael@kernel.org>, <treding@nvidia.com>, <jonathanh@nvidia.com>,
<linux-pm@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <bbasu@nvidia.com>
Subject: Re: [Patch] cpufreq: tegra194: fix warning due to missing opp_put
Date: Tue, 29 Aug 2023 14:15:12 +0530 [thread overview]
Message-ID: <b795f75a-83b1-2ebf-871d-50aa9ccd2178@nvidia.com> (raw)
In-Reply-To: <20230829055930.csddryecm72ehz3o@vireshk-i7>
On 29/08/23 11:29, Viresh Kumar wrote:
> External email: Use caution opening links or attachments
>
>
> On 28-08-23, 17:39, Sumit Gupta wrote:
>> Fix the warning due to missing dev_pm_opp_put() call and hence
>> wrong refcount value. This causes below warning message when
>> trying to remove the module.
>>
>> Call trace:
>> dev_pm_opp_put_opp_table+0x154/0x15c
>> dev_pm_opp_remove_table+0x34/0xa0
>> _dev_pm_opp_cpumask_remove_table+0x7c/0xbc
>> dev_pm_opp_of_cpumask_remove_table+0x10/0x18
>> tegra194_cpufreq_exit+0x24/0x34 [tegra194_cpufreq]
>> cpufreq_remove_dev+0xa8/0xf8
>> subsys_interface_unregister+0x90/0xe8
>> cpufreq_unregister_driver+0x54/0x9c
>> tegra194_cpufreq_remove+0x18/0x2c [tegra194_cpufreq]
>> platform_remove+0x24/0x74
>> device_remove+0x48/0x78
>> device_release_driver_internal+0xc8/0x160
>> driver_detach+0x4c/0x90
>> bus_remove_driver+0x68/0xb8
>> driver_unregister+0x2c/0x58
>> platform_driver_unregister+0x10/0x18
>> tegra194_ccplex_driver_exit+0x14/0x1e0 [tegra194_cpufreq]
>> __arm64_sys_delete_module+0x184/0x270
>>
>> Fixes: f41e1442ac5b ("cpufreq: tegra194: add OPP support and set bandwidth")
>> Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
>> ---
>> drivers/cpufreq/tegra194-cpufreq.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/cpufreq/tegra194-cpufreq.c b/drivers/cpufreq/tegra194-cpufreq.c
>> index 88ef5e57ccd0..f63f7a6c2034 100644
>> --- a/drivers/cpufreq/tegra194-cpufreq.c
>> +++ b/drivers/cpufreq/tegra194-cpufreq.c
>> @@ -454,6 +454,8 @@ static int tegra_cpufreq_init_cpufreq_table(struct cpufreq_policy *policy,
>
> You need to put the OPP here, even if this fails.
>
Sent v2 with the change. Thank you for pointing.
Regards,
Sumit Gupta
>> if (ret < 0)
>> return ret;
>>
>> + dev_pm_opp_put(opp);
>> +
>> freq_table[j].driver_data = pos->driver_data;
>> freq_table[j].frequency = pos->frequency;
>> j++;
>> --
>> 2.17.1
>
> --
> viresh
prev parent reply other threads:[~2023-08-29 8:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-28 12:09 [Patch] cpufreq: tegra194: fix warning due to missing opp_put Sumit Gupta
2023-08-29 5:59 ` Viresh Kumar
2023-08-29 8:45 ` Sumit Gupta [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=b795f75a-83b1-2ebf-871d-50aa9ccd2178@nvidia.com \
--to=sumitg@nvidia.com \
--cc=bbasu@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=treding@nvidia.com \
--cc=viresh.kumar@linaro.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