[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YDeIcsQeDloy5Lx3@smile.fi.intel.com>
Date: Thu, 25 Feb 2021 13:22:26 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: rafael@...nel.org, linux-kernel@...r.kernel.org,
Christian Eggers <ceggers@...i.de>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Lukasz Luba <lukasz.luba@....com>
Subject: Re: [PATCH v2 1/9] units: Add the HZ macros
On Wed, Feb 24, 2021 at 03:42:11PM +0100, Daniel Lezcano wrote:
> The macros for the unit conversion for frequency are duplicated in
> different places.
>
> Provide these macros in the 'units' header, so they can be reused.
For the all that have not been tagged:
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Thanks!
> Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
> Reviewed-by: Christian Eggers <ceggers@...i.de>
> Reviewed-by: Andy Shevchenko <Andy.Shevchenko@...il.com>
> ---
> include/linux/units.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/units.h b/include/linux/units.h
> index dcc30a53fa93..218ec0d314b6 100644
> --- a/include/linux/units.h
> +++ b/include/linux/units.h
> @@ -4,6 +4,10 @@
>
> #include <linux/math.h>
>
> +#define HZ_PER_KHZ 1000L
> +#define KHZ_PER_MHZ 1000L
> +#define HZ_PER_MHZ 1000000L
> +
> #define MILLIWATT_PER_WATT 1000L
> #define MICROWATT_PER_MILLIWATT 1000L
> #define MICROWATT_PER_WATT 1000000L
> --
> 2.17.1
>
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists