* [PATCH 2/2] units: Use the HZ_PER_KHZ macro
[not found] <20210223203004.7219-1-daniel.lezcano@linaro.org>
@ 2021-02-23 20:30 ` Daniel Lezcano
2021-02-23 20:36 ` Christian Eggers
2021-02-24 6:25 ` Chanwoo Choi
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Lezcano @ 2021-02-23 20:30 UTC (permalink / raw)
To: rafael
Cc: MyungJoo Ham, Kyungmin Park, Chanwoo Choi, Christian Eggers,
Jonathan Cameron, Lars-Peter Clausen, Peter Meerwald-Stadler,
Zhang Rui, Amit Kucheria, open list:DEVICE FREQUENCY (DEVFREQ),
open list, open list:AMS AS73211 DRIVER
The HZ_PER_KHZ macro definition is duplicated in different subsystems.
The macro now exists in include/linux/units.h, make use of it and
remove all the duplicated ones.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
drivers/devfreq/devfreq.c | 2 +-
drivers/iio/light/as73211.c | 3 +--
drivers/thermal/devfreq_cooling.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 6aa10de792b3..4c636c336ace 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;
diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c
index 7b32dfaee9b3..3ba2378df3dd 100644
--- a/drivers/iio/light/as73211.c
+++ b/drivers/iio/light/as73211.c
@@ -24,8 +24,7 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/pm.h>
-
-#define HZ_PER_KHZ 1000
+#include <linux/units.h>
#define AS73211_DRV_NAME "as73211"
diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
index fed3121ff2a1..fa5b8b0c7604 100644
--- a/drivers/thermal/devfreq_cooling.c
+++ b/drivers/thermal/devfreq_cooling.c
@@ -19,10 +19,10 @@
#include <linux/pm_opp.h>
#include <linux/pm_qos.h>
#include <linux/thermal.h>
+#include <linux/units.h>
#include <trace/events/thermal.h>
-#define HZ_PER_KHZ 1000
#define SCALE_ERROR_MITIGATION 100
static DEFINE_IDA(devfreq_ida);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] units: Use the HZ_PER_KHZ macro
2021-02-23 20:30 ` [PATCH 2/2] units: Use the HZ_PER_KHZ macro Daniel Lezcano
@ 2021-02-23 20:36 ` Christian Eggers
2021-02-24 6:25 ` Chanwoo Choi
1 sibling, 0 replies; 3+ messages in thread
From: Christian Eggers @ 2021-02-23 20:36 UTC (permalink / raw)
To: rafael, Daniel Lezcano
Cc: MyungJoo Ham, Kyungmin Park, Chanwoo Choi, Jonathan Cameron,
Lars-Peter Clausen, Peter Meerwald-Stadler, Zhang Rui,
Amit Kucheria, open list:DEVICE FREQUENCY (DEVFREQ), open list,
open list:AMS AS73211 DRIVER
On Tuesday, 23 February 2021, 21:30:02 CET, Daniel Lezcano wrote:
> The HZ_PER_KHZ macro definition is duplicated in different subsystems.
>
> The macro now exists in include/linux/units.h, make use of it and
> remove all the duplicated ones.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/devfreq/devfreq.c | 2 +-
> drivers/iio/light/as73211.c | 3 +--
> drivers/thermal/devfreq_cooling.c | 2 +-
> 3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 6aa10de792b3..4c636c336ace 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;
> diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c
> index 7b32dfaee9b3..3ba2378df3dd 100644
> --- a/drivers/iio/light/as73211.c
> +++ b/drivers/iio/light/as73211.c
> @@ -24,8 +24,7 @@
> #include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/pm.h>
> -
> -#define HZ_PER_KHZ 1000
> +#include <linux/units.h>
>
> #define AS73211_DRV_NAME "as73211"
>
> diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
> index fed3121ff2a1..fa5b8b0c7604 100644
> --- a/drivers/thermal/devfreq_cooling.c
> +++ b/drivers/thermal/devfreq_cooling.c
> @@ -19,10 +19,10 @@
> #include <linux/pm_opp.h>
> #include <linux/pm_qos.h>
> #include <linux/thermal.h>
> +#include <linux/units.h>
>
> #include <trace/events/thermal.h>
>
> -#define HZ_PER_KHZ 1000
> #define SCALE_ERROR_MITIGATION 100
>
> static DEFINE_IDA(devfreq_ida);
>
Reviewed-by: Christian Eggers <ceggers@arri.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] units: Use the HZ_PER_KHZ macro
2021-02-23 20:30 ` [PATCH 2/2] units: Use the HZ_PER_KHZ macro Daniel Lezcano
2021-02-23 20:36 ` Christian Eggers
@ 2021-02-24 6:25 ` Chanwoo Choi
1 sibling, 0 replies; 3+ messages in thread
From: Chanwoo Choi @ 2021-02-24 6:25 UTC (permalink / raw)
To: Daniel Lezcano, rafael
Cc: MyungJoo Ham, Kyungmin Park, Christian Eggers, Jonathan Cameron,
Lars-Peter Clausen, Peter Meerwald-Stadler, Zhang Rui,
Amit Kucheria, open list:DEVICE FREQUENCY (DEVFREQ), open list,
open list:AMS AS73211 DRIVER
On 2/24/21 5:30 AM, Daniel Lezcano wrote:
> The HZ_PER_KHZ macro definition is duplicated in different subsystems.
>
> The macro now exists in include/linux/units.h, make use of it and
> remove all the duplicated ones.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/devfreq/devfreq.c | 2 +-
> drivers/iio/light/as73211.c | 3 +--
> drivers/thermal/devfreq_cooling.c | 2 +-
> 3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 6aa10de792b3..4c636c336ace 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;
> diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c
> index 7b32dfaee9b3..3ba2378df3dd 100644
> --- a/drivers/iio/light/as73211.c
> +++ b/drivers/iio/light/as73211.c
> @@ -24,8 +24,7 @@
> #include <linux/module.h>
> #include <linux/mutex.h>
> #include <linux/pm.h>
> -
> -#define HZ_PER_KHZ 1000
> +#include <linux/units.h>
>
> #define AS73211_DRV_NAME "as73211"
>
> diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
> index fed3121ff2a1..fa5b8b0c7604 100644
> --- a/drivers/thermal/devfreq_cooling.c
> +++ b/drivers/thermal/devfreq_cooling.c
> @@ -19,10 +19,10 @@
> #include <linux/pm_opp.h>
> #include <linux/pm_qos.h>
> #include <linux/thermal.h>
> +#include <linux/units.h>
>
> #include <trace/events/thermal.h>
>
> -#define HZ_PER_KHZ 1000
> #define SCALE_ERROR_MITIGATION 100
>
> static DEFINE_IDA(devfreq_ida);
>
For devfreq part,
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-24 6:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20210223203004.7219-1-daniel.lezcano@linaro.org>
2021-02-23 20:30 ` [PATCH 2/2] units: Use the HZ_PER_KHZ macro Daniel Lezcano
2021-02-23 20:36 ` Christian Eggers
2021-02-24 6:25 ` Chanwoo Choi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox