diff mbox series

[v2,3/9] devfreq: Use HZ macros

Message ID 20210224144222.23762-3-daniel.lezcano@linaro.org (mailing list archive)
State Under Review
Delegated to: Daniel Lezcano
Headers show
Series None | expand

Commit Message

Daniel Lezcano Feb. 24, 2021, 2:42 p.m. UTC
HZ unit conversion macros are available in units.h, use them and
remove the duplicate definition.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Christian Eggers <ceggers@arri.de>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/devfreq/devfreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chanwoo Choi Feb. 26, 2021, 6:08 a.m. UTC | #1
On 21. 2. 24. 오후 11:42, Daniel Lezcano wrote:
> HZ unit conversion macros are available in units.h, use them and
> remove the duplicate definition.
> 
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> Reviewed-by: Christian Eggers <ceggers@arri.de>
> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>   drivers/devfreq/devfreq.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index bf3047896e41..b6d63f02d293 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -26,6 +26,7 @@
>   #include <linux/hrtimer.h>
>   #include <linux/of.h>
>   #include <linux/pm_qos.h>
> +#include <linux/units.h>
>   #include "governor.h"
>   
>   #define CREATE_TRACE_POINTS
> @@ -33,7 +34,6 @@
>   
>   #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name) ? true : false)
>   #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ? true : false)
> -#define HZ_PER_KHZ	1000
>   
>   static struct class *devfreq_class;
>   static struct dentry *devfreq_debugfs;
> 

I changed the patch title with 'PM /' prefix as following
in order to keep the consistent patch style if there are no any special 
objection.
- PM / devfreq: Use HZ macros

Applied it.

Thanks,
Chanwoo Choi
Daniel Lezcano Feb. 26, 2021, 8:51 a.m. UTC | #2
On 26/02/2021 07:08, Chanwoo Choi wrote:
> 
> 
> On 21. 2. 24. 오후 11:42, Daniel Lezcano wrote:
>> HZ unit conversion macros are available in units.h, use them and
>> remove the duplicate definition.
>>
>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>> Reviewed-by: Christian Eggers <ceggers@arri.de>
>> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
>> ---
>>   drivers/devfreq/devfreq.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>> index bf3047896e41..b6d63f02d293 100644
>> --- a/drivers/devfreq/devfreq.c
>> +++ b/drivers/devfreq/devfreq.c
>> @@ -26,6 +26,7 @@
>>   #include <linux/hrtimer.h>
>>   #include <linux/of.h>
>>   #include <linux/pm_qos.h>
>> +#include <linux/units.h>
>>   #include "governor.h"
>>     #define CREATE_TRACE_POINTS
>> @@ -33,7 +34,6 @@
>>     #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name)
>> ? true : false)
>>   #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ?
>> true : false)
>> -#define HZ_PER_KHZ    1000
>>     static struct class *devfreq_class;
>>   static struct dentry *devfreq_debugfs;
>>
> 
> I changed the patch title with 'PM /' prefix as following
> in order to keep the consistent patch style if there are no any special
> objection.
> - PM / devfreq: Use HZ macros
> 
> Applied it.

It should not compile. This patch and others depend on 1/9.

It would make sense to merge all of them through linux-pm.
Chanwoo Choi Feb. 26, 2021, 9:14 a.m. UTC | #3
On 21. 2. 26. 오후 5:51, Daniel Lezcano wrote:
> On 26/02/2021 07:08, Chanwoo Choi wrote:
>>
>>
>> On 21. 2. 24. 오후 11:42, Daniel Lezcano wrote:
>>> HZ unit conversion macros are available in units.h, use them and
>>> remove the duplicate definition.
>>>
>>> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
>>> Reviewed-by: Christian Eggers <ceggers@arri.de>
>>> Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
>>> ---
>>>    drivers/devfreq/devfreq.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
>>> index bf3047896e41..b6d63f02d293 100644
>>> --- a/drivers/devfreq/devfreq.c
>>> +++ b/drivers/devfreq/devfreq.c
>>> @@ -26,6 +26,7 @@
>>>    #include <linux/hrtimer.h>
>>>    #include <linux/of.h>
>>>    #include <linux/pm_qos.h>
>>> +#include <linux/units.h>
>>>    #include "governor.h"
>>>      #define CREATE_TRACE_POINTS
>>> @@ -33,7 +34,6 @@
>>>      #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name)
>>> ? true : false)
>>>    #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ?
>>> true : false)
>>> -#define HZ_PER_KHZ    1000
>>>      static struct class *devfreq_class;
>>>    static struct dentry *devfreq_debugfs;
>>>
>>
>> I changed the patch title with 'PM /' prefix as following
>> in order to keep the consistent patch style if there are no any special
>> objection.
>> - PM / devfreq: Use HZ macros
>>
>> Applied it.
> 
> It should not compile. This patch and others depend on 1/9.
> 
> It would make sense to merge all of them through linux-pm.

OK. I'm OK to apply it to linux-pm.

Thanks,
Chanwoo Choi
diff mbox series

Patch

diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index bf3047896e41..b6d63f02d293 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -26,6 +26,7 @@ 
 #include <linux/hrtimer.h>
 #include <linux/of.h>
 #include <linux/pm_qos.h>
+#include <linux/units.h>
 #include "governor.h"
 
 #define CREATE_TRACE_POINTS
@@ -33,7 +34,6 @@ 
 
 #define IS_SUPPORTED_FLAG(f, name) ((f & DEVFREQ_GOV_FLAG_##name) ? true : false)
 #define IS_SUPPORTED_ATTR(f, name) ((f & DEVFREQ_GOV_ATTR_##name) ? true : false)
-#define HZ_PER_KHZ	1000
 
 static struct class *devfreq_class;
 static struct dentry *devfreq_debugfs;