From: Jon Hunter <jonathanh@nvidia.com>
To: Kevin Hilman <khilman@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Ulf Hansson <ulf.hansson@linaro.org>,
geert@linux-m68k.org, linux-pm@vger.kernel.org
Subject: Re: [RFC PATCH] PM / Domains: Ensure subdomain is not in use before removing
Date: Thu, 3 Sep 2015 09:08:38 +0100 [thread overview]
Message-ID: <55E80006.4090603@nvidia.com> (raw)
In-Reply-To: <7hbndr48lg.fsf@deeprootsystems.com>
On 28/08/15 18:38, Kevin Hilman wrote:
> Jon Hunter <jonathanh@nvidia.com> writes:
>
>> The function pm_genpd_remove_subdomain() removes a subdomain from a
>> generic PM domain, however, it does not check if the subdomain has any
>> slave domains or device attached before doing so. Therefore, add a test
>> to verify that the subdomain does not have any slave domains associated
>> or any device attached before removing.
>>
>> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
>> ---
>> drivers/base/power/domain.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
>> index 27888a90ca98..a3ed71d8129a 100644
>> --- a/drivers/base/power/domain.c
>> +++ b/drivers/base/power/domain.c
>> @@ -1469,6 +1469,11 @@ int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
>>
>> mutex_lock(&genpd->lock);
>>
>> + if (!list_empty(&subdomain->slave_links) || subdomain->device_count) {
>
> maybe a pr_warn() or similar is appropriate here?
Thanks, good suggestion. Will add.
>> + ret = -EBUSY;
>> + goto out;
>> + }
>> +
>
> ... otherwise looks like a good check to add.
>
> Acked-by: Kevin Hilman <khilman@linaro.org>
Cheers
Jon
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
prev parent reply other threads:[~2015-09-03 8:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-27 9:21 [RFC PATCH] PM / Domains: Ensure subdomain is not in use before removing Jon Hunter
2015-08-27 11:37 ` Geert Uytterhoeven
2015-08-27 11:47 ` Jon Hunter
2015-08-28 17:38 ` Kevin Hilman
2015-09-03 8:08 ` Jon Hunter [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=55E80006.4090603@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=geert@linux-m68k.org \
--cc=khilman@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=ulf.hansson@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.