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

From: Andy Shevchenko
Date: Thu Mar 04 2021 - 04:40:47 EST


On Thu, Mar 4, 2021 at 2:31 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 24 Feb 2021 10:39:36 +0200 Andy Shevchenko <andy.shevchenko@xxxxxxxxx> 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