From: Christian Eggers <ceggers@arri.de>
To: <rafael@kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
"Jonathan Cameron" <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
"Peter Meerwald-Stadler" <pmeerw@pmeerw.net>,
Zhang Rui <rui.zhang@intel.com>,
"Amit Kucheria" <amitk@kernel.org>,
"open list:DEVICE FREQUENCY (DEVFREQ)" <linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:AMS AS73211 DRIVER" <linux-iio@vger.kernel.org>
Subject: Re: [PATCH 2/2] units: Use the HZ_PER_KHZ macro
Date: Tue, 23 Feb 2021 21:36:05 +0100 [thread overview]
Message-ID: <2578027.mvXUDI8C0e@n95hx1g2> (raw)
In-Reply-To: <20210223203004.7219-2-daniel.lezcano@linaro.org>
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>
next prev parent reply other threads:[~2021-02-23 21:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-23 20:30 [PATCH 1/2] units: Add the HZ_PER_KHZ macro Daniel Lezcano
2021-02-23 20:30 ` [PATCH 2/2] units: Use " Daniel Lezcano
2021-02-23 20:36 ` Christian Eggers [this message]
2021-02-24 6:25 ` Chanwoo Choi
[not found] ` <CAHp75VcJwoye5KOYXF3Fs1F-82JPP-7VaU4z5OqBrYDr+AGQ5w@mail.gmail.com>
[not found] ` <CAHp75Vcqug9qC_ejHE03YguiSy-XpsZV6g36-pe3VOFgTS2-tA@mail.gmail.com>
2021-03-04 0:31 ` [PATCH 1/2] units: Add " Andrew Morton
2021-03-04 9:38 ` Andy Shevchenko
2021-03-04 12:41 ` Daniel Lezcano
2021-03-05 1:21 ` Andrew Morton
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=2578027.mvXUDI8C0e@n95hx1g2 \
--to=ceggers@arri.de \
--cc=amitk@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=daniel.lezcano@linaro.org \
--cc=jic23@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=pmeerw@pmeerw.net \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).