All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] cpufreq: Update function comment and document
@ 2021-11-30 15:15 Tang Yizhou
  2021-11-30 15:15 ` [PATCH 1/2] cpufreq: Fix a comment in cpufreq_policy_free Tang Yizhou
  2021-11-30 15:15 ` [PATCH 2/2] doc/cpufreq: Update core.rst Tang Yizhou
  0 siblings, 2 replies; 7+ messages in thread
From: Tang Yizhou @ 2021-11-30 15:15 UTC (permalink / raw)
  To: viresh.kumar, rafael.j.wysocki, rafael
  Cc: linux-pm, linux-kernel, Tang Yizhou

Tang Yizhou (2):
  cpufreq: Fix a comment in cpufreq_policy_free
  doc/cpufreq: Update core.rst

 Documentation/cpu-freq/core.rst | 6 +++---
 drivers/cpufreq/cpufreq.c       | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] cpufreq: Fix a comment in cpufreq_policy_free
  2021-11-30 15:15 [PATCH 0/2] cpufreq: Update function comment and document Tang Yizhou
@ 2021-11-30 15:15 ` Tang Yizhou
  2021-12-01  4:22   ` Viresh Kumar
  2021-11-30 15:15 ` [PATCH 2/2] doc/cpufreq: Update core.rst Tang Yizhou
  1 sibling, 1 reply; 7+ messages in thread
From: Tang Yizhou @ 2021-11-30 15:15 UTC (permalink / raw)
  To: viresh.kumar, rafael.j.wysocki, rafael
  Cc: linux-pm, linux-kernel, Tang Yizhou

The comment is inconsistent with the block_notifier_call_chain() call,
so fix it.

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

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index e338d2f010fe..8f753675e4a2 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1296,7 +1296,7 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy)
 
 	if (policy->max_freq_req) {
 		/*
-		 * CPUFREQ_CREATE_POLICY notification is sent only after
+		 * CPUFREQ_REMOVE_POLICY notification is sent only after
 		 * successfully adding max_freq_req request.
 		 */
 		blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] doc/cpufreq: Update core.rst
  2021-11-30 15:15 [PATCH 0/2] cpufreq: Update function comment and document Tang Yizhou
  2021-11-30 15:15 ` [PATCH 1/2] cpufreq: Fix a comment in cpufreq_policy_free Tang Yizhou
@ 2021-11-30 15:15 ` Tang Yizhou
  2021-12-01  4:21   ` Viresh Kumar
  1 sibling, 1 reply; 7+ messages in thread
From: Tang Yizhou @ 2021-11-30 15:15 UTC (permalink / raw)
  To: viresh.kumar, rafael.j.wysocki, rafael
  Cc: linux-pm, linux-kernel, Tang Yizhou

As the definition of struct cpufreq_freqs has changed, update core.rst
with the new first member of struct cpufreq_freqs.

Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>
---
 Documentation/cpu-freq/core.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/cpu-freq/core.rst b/Documentation/cpu-freq/core.rst
index 33cb90bd1d8f..4ceef8e7217c 100644
--- a/Documentation/cpu-freq/core.rst
+++ b/Documentation/cpu-freq/core.rst
@@ -73,12 +73,12 @@ CPUFREQ_POSTCHANGE.
 The third argument is a struct cpufreq_freqs with the following
 values:
 
-=====	===========================
-cpu	number of the affected CPU
+======	======================================
+policy	a pointer to the struct cpufreq_policy
 old	old frequency
 new	new frequency
 flags	flags of the cpufreq driver
-=====	===========================
+======	======================================
 
 3. CPUFreq Table Generation with Operating Performance Point (OPP)
 ==================================================================
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] doc/cpufreq: Update core.rst
  2021-11-30 15:15 ` [PATCH 2/2] doc/cpufreq: Update core.rst Tang Yizhou
@ 2021-12-01  4:21   ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2021-12-01  4:21 UTC (permalink / raw)
  To: Tang Yizhou; +Cc: rafael.j.wysocki, rafael, linux-pm, linux-kernel

On 30-11-21, 23:15, Tang Yizhou wrote:
> As the definition of struct cpufreq_freqs has changed, update core.rst
> with the new first member of struct cpufreq_freqs.
> 
> Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>
> ---
>  Documentation/cpu-freq/core.rst | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/cpu-freq/core.rst b/Documentation/cpu-freq/core.rst
> index 33cb90bd1d8f..4ceef8e7217c 100644
> --- a/Documentation/cpu-freq/core.rst
> +++ b/Documentation/cpu-freq/core.rst
> @@ -73,12 +73,12 @@ CPUFREQ_POSTCHANGE.
>  The third argument is a struct cpufreq_freqs with the following
>  values:
>  
> -=====	===========================
> -cpu	number of the affected CPU
> +======	======================================
> +policy	a pointer to the struct cpufreq_policy
>  old	old frequency
>  new	new frequency
>  flags	flags of the cpufreq driver
> -=====	===========================
> +======	======================================
>  
>  3. CPUFreq Table Generation with Operating Performance Point (OPP)
>  ==================================================================

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] cpufreq: Fix a comment in cpufreq_policy_free
  2021-11-30 15:15 ` [PATCH 1/2] cpufreq: Fix a comment in cpufreq_policy_free Tang Yizhou
@ 2021-12-01  4:22   ` Viresh Kumar
  2021-12-01  6:39     ` Tang Yizhou
  0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2021-12-01  4:22 UTC (permalink / raw)
  To: Tang Yizhou; +Cc: rafael.j.wysocki, rafael, linux-pm, linux-kernel

On 30-11-21, 23:15, Tang Yizhou wrote:
> The comment is inconsistent with the block_notifier_call_chain() call,
> so fix it.
> 
> Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>
> ---
>  drivers/cpufreq/cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index e338d2f010fe..8f753675e4a2 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1296,7 +1296,7 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy)
>  
>  	if (policy->max_freq_req) {
>  		/*
> -		 * CPUFREQ_CREATE_POLICY notification is sent only after
> +		 * CPUFREQ_REMOVE_POLICY notification is sent only after

No, the earlier comment is correct. It says when the CREATE notification was
sent and so we need to do the remove here before removing max_freq_req.

>  		 * successfully adding max_freq_req request.
>  		 */
>  		blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
> -- 
> 2.17.1

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] cpufreq: Fix a comment in cpufreq_policy_free
  2021-12-01  4:22   ` Viresh Kumar
@ 2021-12-01  6:39     ` Tang Yizhou
  2021-12-01  6:47       ` Viresh Kumar
  0 siblings, 1 reply; 7+ messages in thread
From: Tang Yizhou @ 2021-12-01  6:39 UTC (permalink / raw)
  To: Viresh Kumar; +Cc: rafael.j.wysocki, rafael, linux-pm, linux-kernel

On 2021/12/1 12:22, Viresh Kumar wrote:
> On 30-11-21, 23:15, Tang Yizhou wrote:
>> The comment is inconsistent with the block_notifier_call_chain() call,
>> so fix it.
>>
>> Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>
>> ---
>>  drivers/cpufreq/cpufreq.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
>> index e338d2f010fe..8f753675e4a2 100644
>> --- a/drivers/cpufreq/cpufreq.c
>> +++ b/drivers/cpufreq/cpufreq.c
>> @@ -1296,7 +1296,7 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy)
>>  
>>  	if (policy->max_freq_req) {
>>  		/*
>> -		 * CPUFREQ_CREATE_POLICY notification is sent only after
>> +		 * CPUFREQ_REMOVE_POLICY notification is sent only after
> 
> No, the earlier comment is correct. It says when the CREATE notification was
> sent and so we need to do the remove here before removing max_freq_req.

I see. I was confused at the first time. Perhaps it is better to both comment when
CPUFREQ_CREATE_POLICY and CPUFREQ_REMOVE_POLICY notification is sent.

> 
>>  		 * successfully adding max_freq_req request.
>>  		 */
>>  		blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
>> -- 
>> 2.17.1
> 

Tang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] cpufreq: Fix a comment in cpufreq_policy_free
  2021-12-01  6:39     ` Tang Yizhou
@ 2021-12-01  6:47       ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2021-12-01  6:47 UTC (permalink / raw)
  To: Tang Yizhou; +Cc: rafael.j.wysocki, rafael, linux-pm, linux-kernel

On 01-12-21, 14:39, Tang Yizhou wrote:
> On 2021/12/1 12:22, Viresh Kumar wrote:
> > On 30-11-21, 23:15, Tang Yizhou wrote:
> >> The comment is inconsistent with the block_notifier_call_chain() call,
> >> so fix it.
> >>
> >> Signed-off-by: Tang Yizhou <tangyizhou@huawei.com>
> >> ---
> >>  drivers/cpufreq/cpufreq.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> >> index e338d2f010fe..8f753675e4a2 100644
> >> --- a/drivers/cpufreq/cpufreq.c
> >> +++ b/drivers/cpufreq/cpufreq.c
> >> @@ -1296,7 +1296,7 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy)
> >>  
> >>  	if (policy->max_freq_req) {
> >>  		/*
> >> -		 * CPUFREQ_CREATE_POLICY notification is sent only after
> >> +		 * CPUFREQ_REMOVE_POLICY notification is sent only after
> > 
> > No, the earlier comment is correct. It says when the CREATE notification was
> > sent and so we need to do the remove here before removing max_freq_req.
> 
> I see. I was confused at the first time. Perhaps it is better to both comment when
> CPUFREQ_CREATE_POLICY and CPUFREQ_REMOVE_POLICY notification is sent.

I am fine with elaborating the comment, sure. Please send another patch for
that.

-- 
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-12-01  6:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 15:15 [PATCH 0/2] cpufreq: Update function comment and document Tang Yizhou
2021-11-30 15:15 ` [PATCH 1/2] cpufreq: Fix a comment in cpufreq_policy_free Tang Yizhou
2021-12-01  4:22   ` Viresh Kumar
2021-12-01  6:39     ` Tang Yizhou
2021-12-01  6:47       ` Viresh Kumar
2021-11-30 15:15 ` [PATCH 2/2] doc/cpufreq: Update core.rst Tang Yizhou
2021-12-01  4:21   ` Viresh Kumar

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.