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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <o4snk6isxzpkgmcgr7ff2zfuqwqvd5mbvbff5d3cd7jspiljwb@pv57a63fyfin>
Date: Tue, 5 Aug 2025 17:13:15 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Stefano Manni <stefano.manni@...il.com>, lars@...afoo.de, 
	Michael.Hennerich@...log.com, jic23@...nel.org, dlechner@...libre.com, nuno.sa@...log.com, 
	andy@...nel.org, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: ad799x: add reference supply for ad7994

On Tue, Aug 05, 2025 at 03:13:06PM +0200, Andy Shevchenko wrote:
> On Tue, Aug 5, 2025 at 2:28 PM Stefano Manni <stefano.manni@...il.com> wrote:
> >
> > AD7994 supports the external reference voltage on pin REFIN.
> 
> ...
> 
> > -               if ((st->id == ad7991) || (st->id == ad7995) || (st->id == ad7999)) {
> > +               if ((st->id == ad7991) || (st->id == ad7995) || (st->id == ad7999)
> > +                       (st->id == ad7994)) {
> 
> Instead of making this conditional longer and uglier, it is better to
> add a boolean field to chip_info and just check it instead. This will
> remove the churn when any new chip will require the same change in the
> future.
> 
> So, please make it two patches:
> - introducing a field in chip_info and use it for the existing cases
> - add this field to be true for the ad7994 case.

Agreed!

Plus either is already too late for my eyes but I don't think this patch
is compilable.

- Nuno Sá
> 
> Is it doable?
> 
> -- 
> With Best Regards,
> Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ