[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ffdd3de-c30e-f237-7bd7-2700d426e53a@linaro.org>
Date: Thu, 4 Mar 2021 13:41:27 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andy.shevchenko@...il.com>
Cc: "rafael@...nel.org" <rafael@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Lukasz Luba <lukasz.luba@....com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] units: Add the HZ_PER_KHZ macro
Hi Andrew,
On 04/03/2021 01:31, Andrew Morton wrote:
> On Wed, 24 Feb 2021 10:39:36 +0200 Andy Shevchenko <andy.shevchenko@...il.com> wrote:
>
>> On Wednesday, February 24, 2021, Andy Shevchenko <andy.shevchenko@...il.com>
>> wrote:
>>
>>>
>>>
>>> On Tuesday, February 23, 2021, Daniel Lezcano <daniel.lezcano@...aro.org>
>>> wrote:
>>>
>>>> The macro for the unit conversion for frequency is duplicated in
>>>> different places.
>>>>
>>>> Provide this macro in the 'units' header, so it can be reused.
>>>>
>>>>
>>>
>>> Thanks! That was the idea behind my reviews to add those definitions
>>> explicitly in the users. I just want to be sure you covered them all. Also
>>> there are few non-standard names for above in some drivers (they can be
>>> fixed on per driver basis in separate patches though).
>>>
>>>
>>
>> Seems you introduced a common macro and forget about dropping it elsewhere.
>>
>> https://elixir.bootlin.com/linux/latest/A/ident/HZ_PER_MHZ
>
> Yes. And HZ_PER_KHZ.
Thanks for the review, it is fixed it in the v2.
> Also, why make them signed types? Negative Hz is physically
> nonsensical. If that upsets some code somewhere because it was dealing
> with signed types then, well, that code needed fixing anyway.
>
> Ditto MILLIWATT_PER_WATT and friends, sigh.
At the first glance converting to unsigned long should not hurt the
users of this macro.
The current series introduces the macro and its usage but by converting
the existing type.
Is it ok if I send a separate series to change the units from L to UL?
--
<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
Powered by blists - more mailing lists