Re: [PATCH 1/2] units: Add the HZ_PER_KHZ macro

Andy Shevchenko
2021-03-04T09:41:02Z

On Thu, Mar 4, 2021 at 2:31 AM Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 24 Feb 2021 10:39:36 +0200 Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

...

> 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.

And all seconds also. I guess it's historically like this and in any
case I don't expect we will have multipliers that don't fit long long.

There might be some subtle integral promotion rules that screw the
flow up, but I have not much experience with it to be honest.

--
With Best Regards,
Andy Shevchenko