2021-02-25 00:59:33

by Daniel Lezcano

[permalink] [raw]
Subject: [PATCH v2 1/9] units: Add the HZ macros

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.

Signed-off-by: Daniel Lezcano <[email protected]>
Reviewed-by: Christian Eggers <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
---
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


2021-02-25 11:50:18

by Andy Shevchenko

[permalink] [raw]
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 <[email protected]>

Thanks!

> Signed-off-by: Daniel Lezcano <[email protected]>
> Reviewed-by: Christian Eggers <[email protected]>
> Reviewed-by: Andy Shevchenko <[email protected]>
> ---
> 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


2021-03-19 08:10:28

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH v2 1/9] units: Add the HZ macros


Hi Rafael,

is it possible to merge this series through linux-pm ?


On 25/02/2021 12:22, Andy Shevchenko wrote:
> 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 <[email protected]>
>
> Thanks!
>
>> Signed-off-by: Daniel Lezcano <[email protected]>
>> Reviewed-by: Christian Eggers <[email protected]>
>> Reviewed-by: Andy Shevchenko <[email protected]>
>> ---
>> 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
>>
>


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

2021-05-10 13:14:02

by Andy Shevchenko

[permalink] [raw]
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.

Hmm... I think you need to rebase, add cover letter and resend.

--
With Best Regards,
Andy Shevchenko


2021-07-12 16:35:30

by Andy Shevchenko

[permalink] [raw]
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.

Any progress on this? Are you planning to resubmit?

--
With Best Regards,
Andy Shevchenko


2021-07-15 14:19:59

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH v2 1/9] units: Add the HZ macros

On 12/07/2021 18:34, Andy Shevchenko wrote:
> 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.
>
> Any progress on this? Are you planning to resubmit?

Yes, I'll resubmit a new series.




--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog