lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4085fd58-c92c-406b-842b-ecda2fb3c895@gmail.com>
Date: Mon, 28 Apr 2025 12:45:13 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
 Jonathan Cameron <jic23@...nel.org>, David Lechner <dlechner@...libre.com>,
 Nuno Sá <nuno.sa@...log.com>,
 Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: ti-adc128s052: Drop variable vref

On 28/04/2025 10:08, Andy Shevchenko wrote:
> On Mon, Apr 28, 2025 at 10:02 AM Matti Vaittinen
> <mazziesaccount@...il.com> wrote:
>>
>> According to Jonathan, variable reference voltages are very rare. It is
>> unlikely it is needed, and supporting it makes the code a bit more
>> complex.
>>
>> Simplify the driver and drop the variable vref support.
> 
> ...
> 
>> +       int vref_mv;
> 
> vref_mV please. And yes, I know historical and other reasons for them
> all being small, but let's try to be more scientific in these crazy
> days.

Sorry Andy but I see zero reason to use capital letters here. In my 
opinion, this is perfectly clear as it is. Capital letters in variables 
are ugly (to me) and absolutely not needed to explain the meaning.

> ...
> 
>> +       adc->vref_mv = ret / 1000;
> 
> MILLI ?

I suppose using MILLI is Ok. (Although 1000 seems still clear enough to 
me. Seeing the amount of zeroes at a glance gets troublesome for me at 
10000).

> Or actually a time to introduce MILLIVOLT_PER_VOLT in units.h ?

I really fail to see the benefit. Do you think we should add 
MILLIx_PER_x for each unit we can imagine/use?

That doesn't really scale or make sense to me. We have MILLI. It does 
not really matter if it is volts, amps, ohms or horse heads - it's still 
1000. It just gets cumbersome to search the headers to see if we have 
some fancy define for unit we have at our hands.

And, to repeat myself - for me even the 1000 is still clear as it is.

Yours,
	-- Matti

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ