mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "rafael@kernel.org" <rafael@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] units: Add the HZ_PER_KHZ macro
Date: Thu, 4 Mar 2021 13:41:27 +0100	[thread overview]
Message-ID: <3ffdd3de-c30e-f237-7bd7-2700d426e53a@linaro.org> (raw)
In-Reply-To: <20210303163125.dcc0a086a939a58ed30750e8@linux-foundation.org>


Hi Andrew,

On 04/03/2021 01:31, Andrew Morton wrote:
> On Wed, 24 Feb 2021 10:39:36 +0200 Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> 
>> On Wednesday, February 24, 2021, Andy Shevchenko <andy.shevchenko@gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Tuesday, February 23, 2021, Daniel Lezcano <daniel.lezcano@linaro.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

  parent reply	other threads:[~2021-03-04 12:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23 20:30 Daniel Lezcano
2021-02-23 20:30 ` [PATCH 2/2] units: Use " Daniel Lezcano
2021-02-23 20:36   ` Christian Eggers
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 [this message]
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=3ffdd3de-c30e-f237-7bd7-2700d426e53a@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    /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

all inboxes | Powered by JetHome®