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: <CA+4VgcJW=9rtuqr3VZbfA8QxgYAR+KvfAHdf_0xv4XLQtVVQJw@mail.gmail.com>
Date: Wed, 4 Dec 2024 11:20:20 +0800
From: Yu-Hsian Yang <j2anfernee@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: avifishman70@...il.com, tmaimon77@...il.com, tali.perry1@...il.com, 
	venture@...gle.com, yuenn@...gle.com, benjaminfair@...gle.com, 
	jic23@...nel.org, lars@...afoo.de, robh@...nel.org, krzk+dt@...nel.org, 
	conor+dt@...nel.org, nuno.sa@...log.com, dlechner@...libre.com, 
	javier.carrasco.cruz@...il.com, marcelo.schmitt@...log.com, 
	olivier.moysan@...s.st.com, mitrutzceclan@...il.com, tgamblin@...libre.com, 
	matteomartelli3@...il.com, alisadariana@...il.com, gstols@...libre.com, 
	thomas.bonnefille@...tlin.com, ramona.nechita@...log.com, 
	mike.looijmans@...ic.nl, chanh@...amperecomputing.com, KWLIU@...oton.com, 
	yhyang2@...oton.com, openbmc@...ts.ozlabs.org, linux-iio@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: add Nuvoton NCT720x ADC driver

Dear Andy Shevchenko,

Thank you for your comment.

Andy Shevchenko <andriy.shevchenko@...ux.intel.com> 於 2024年12月3日 週二 下午9:50寫道:
>
> On Tue, Dec 03, 2024 at 05:15:40PM +0800, Eason Yang wrote:
> > Add Nuvoton NCT7201/NCT7202 system voltage monitor 12-bit ADC driver
> >
> > NCT7201/NCT7202 supports up to 12 analog voltage monitor inputs and up to
> > 4 SMBus addresses by ADDR pin. Meanwhile, ALERT# hardware event pins for
> > independent alarm signals, and the all threshold values could be set for
> > system protection without any timing delay. It also supports reset input
> > RSTIN# to recover system from a fault condition.
> >
> > Currently, only single-edge mode conversion and threshold events support.
>
> Please, get rid of explicit castings where the are not needed or implied, like
>
>         u16 foo;
>         ...
>         foo = (u16)bar;
>
> you have a lot of this in the code.
>

We would  get rid of explicit castings in all codes.

> Second, why do you need two regmaps? How debugfs is supposed to work on the
> registers that are 16-bit if you access them via 8-bit regmap and vice versa?
>
> Can't you simply use bulk reads/writes when it makes sense and drop 16-bit
> regmap completely?
>
>

Read VIN info can use word read or byte read, and other registers
should use byte read.

For a reviewer's comment,
If the i2c controller allows word read
then the right thing is to always use it.


> --
> With Best Regards,
> Andy Shevchenko
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ