mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tang Yizhou <tangyizhou@huawei.com>
To: <viresh.kumar@linaro.org>, <rafael.j.wysocki@intel.com>,
	<rafael@kernel.org>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Tang Yizhou <tangyizhou@huawei.com>
Subject: [PATCH v2 1/2] cpufreq: Fix a comment in cpufreq_policy_free
Date: Wed, 1 Dec 2021 15:14:59 +0800	[thread overview]
Message-ID: <20211201071500.28648-2-tangyizhou@huawei.com> (raw)
In-Reply-To: <20211201071500.28648-1-tangyizhou@huawei.com>

Comment both when CPUFREQ_CREATE_POLICY and CPUFREQ_REMOVE_POLICY
notification are sent.

Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>
---
 drivers/cpufreq/cpufreq.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index e338d2f010fe..e76777881739 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1296,8 +1296,9 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy)
 
 	if (policy->max_freq_req) {
 		/*
-		 * CPUFREQ_CREATE_POLICY notification is sent only after
-		 * successfully adding max_freq_req request.
+		 * Need to send CPUFREQ_REMOVE_POLICY notification if
+		 * max_freq_req request is successfully added.
+		 * See also: CPUFREQ_CREATE_POLICY notification.
 		 */
 		blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
 					     CPUFREQ_REMOVE_POLICY, policy);
@@ -1429,6 +1430,10 @@ static int cpufreq_online(unsigned int cpu)
 			goto out_destroy_policy;
 		}
 
+		/*
+		 * CPUFREQ_CREATE_POLICY notification is sent only after
+		 * successfully adding max_freq_req request.
+		 */
 		blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
 				CPUFREQ_CREATE_POLICY, policy);
 	}
-- 
2.17.1


  reply	other threads:[~2021-12-01  6:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  7:14 [PATCH v2 0/2] cpufreq: Update function comment and document Tang Yizhou
2021-12-01  7:14 ` Tang Yizhou [this message]
2021-12-01  6:51   ` [PATCH v2 1/2] cpufreq: Fix a comment in cpufreq_policy_free Viresh Kumar
2021-12-01  7:15 ` [PATCH v2 2/2] doc/cpufreq: Update core.rst Tang Yizhou

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=20211201071500.28648-2-tangyizhou@huawei.com \
    --to=tangyizhou@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rafael@kernel.org \
    --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

all inboxes | Powered by JetHome®