diff mbox series

PM / devfreq: passive: use HZ_PER_KHZ macro in units.h

Message ID 20220610075428.62268-1-yangyicong@hisilicon.com (mailing list archive)
State New, archived
Delegated to: Chanwoo Choi
Headers show
Series PM / devfreq: passive: use HZ_PER_KHZ macro in units.h | expand

Commit Message

Yicong Yang June 10, 2022, 7:54 a.m. UTC
HZ macros has been centralized in units.h since [1]. Use it to avoid
duplicated definition.

[1] commit e2c77032fcbe ("units: add the HZ macros")

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
---
 drivers/devfreq/governor_passive.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Chanwoo Choi June 17, 2022, 7:36 p.m. UTC | #1
On 22. 6. 10. 16:54, Yicong Yang wrote:
> HZ macros has been centralized in units.h since [1]. Use it to avoid
> duplicated definition.
> 
> [1] commit e2c77032fcbe ("units: add the HZ macros")
> 
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
> ---
>  drivers/devfreq/governor_passive.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c
> index 72c67979ebe1..a2cf6c6a1a39 100644
> --- a/drivers/devfreq/governor_passive.c
> +++ b/drivers/devfreq/governor_passive.c
> @@ -14,10 +14,9 @@
>  #include <linux/slab.h>
>  #include <linux/device.h>
>  #include <linux/devfreq.h>
> +#include <linux/units.h>
>  #include "governor.h"
>  
> -#define HZ_PER_KHZ	1000
> -
>  static struct devfreq_cpu_data *
>  get_parent_cpu_data(struct devfreq_passive_data *p_data,
>  		    struct cpufreq_policy *policy)

Thanks for the fixup. Just use capital letter for first character
of patch title as following: 
- PM / devfreq: passive: Use HZ_PER_KHZ macro in units.h

Applied it.
Yicong Yang June 20, 2022, 6:50 a.m. UTC | #2
On 2022/6/18 3:36, Chanwoo Choi wrote:
> On 22. 6. 10. 16:54, Yicong Yang wrote:
>> HZ macros has been centralized in units.h since [1]. Use it to avoid
>> duplicated definition.
>>
>> [1] commit e2c77032fcbe ("units: add the HZ macros")
>>
>> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
>> ---
>>  drivers/devfreq/governor_passive.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c
>> index 72c67979ebe1..a2cf6c6a1a39 100644
>> --- a/drivers/devfreq/governor_passive.c
>> +++ b/drivers/devfreq/governor_passive.c
>> @@ -14,10 +14,9 @@
>>  #include <linux/slab.h>
>>  #include <linux/device.h>
>>  #include <linux/devfreq.h>
>> +#include <linux/units.h>
>>  #include "governor.h"
>>  
>> -#define HZ_PER_KHZ	1000
>> -
>>  static struct devfreq_cpu_data *
>>  get_parent_cpu_data(struct devfreq_passive_data *p_data,
>>  		    struct cpufreq_policy *policy)
> 
> Thanks for the fixup. Just use capital letter for first character
> of patch title as following: 
> - PM / devfreq: passive: Use HZ_PER_KHZ macro in units.h
> 

Thanks! I checked `git log --oneline drivers/devfreq/governor_passive.c`
but might typed it wrong.. will take care.
diff mbox series

Patch

diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c
index 72c67979ebe1..a2cf6c6a1a39 100644
--- a/drivers/devfreq/governor_passive.c
+++ b/drivers/devfreq/governor_passive.c
@@ -14,10 +14,9 @@ 
 #include <linux/slab.h>
 #include <linux/device.h>
 #include <linux/devfreq.h>
+#include <linux/units.h>
 #include "governor.h"
 
-#define HZ_PER_KHZ	1000
-
 static struct devfreq_cpu_data *
 get_parent_cpu_data(struct devfreq_passive_data *p_data,
 		    struct cpufreq_policy *policy)