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: <20250504182708.42eff56f@jic23-huawei>
Date: Sun, 4 May 2025 18:27:08 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Marcelo Schmitt <marcelo.schmitt1@...il.com>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>, Marcelo Schmitt
 <marcelo.schmitt@...log.com>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, lars@...afoo.de,
 Michael.Hennerich@...log.com, dlechner@...libre.com, nuno.sa@...log.com,
 andy@...nel.org, robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org
Subject: Re: [PATCH v2 3/7] iio: adc: ad4170: Add support for buffered data
 capture

On Wed, 30 Apr 2025 10:40:21 -0300
Marcelo Schmitt <marcelo.schmitt1@...il.com> wrote:

> Hi Andy, thank you for your review.
> 
> ...
> > > +static int ad4170_prepare_spi_message(struct ad4170_state *st)
> > > +{
> > > +       /*
> > > +        * Continuous data register read is enabled on buffer postenable so
> > > +        * no instruction phase is needed meaning we don't need to send the
> > > +        * register address to read data. Transfer only needs the read buffer.
> > > +        */
> > > +       st->xfer.rx_buf = &st->rx_buf;
> > > +       st->xfer.len = BITS_TO_BYTES(ad4170_channel_template.scan_type.realbits);  
> > 
> > This will give, e.g., 3 for the realbits == 24. Is this expected?  
> 
> Yes, in continuous read mode the ADC outputs just the conversion result bits
> (24-bits) so a 3-byte length transfer is enough to get the conversion data for a
> channel.
> 
> >   
> ...
> >   
> > > +               return dev_err_probe(&st->spi->dev, ret,
> > > +                                    "Failed to register trigger\n");  
> > 
> > One line?  
> 
> It goes up to 89 columns if make in one line. I know there are other places in
> this driver where 80 columns are exceeded, but in this case it's easier to
> avoid going beyond 80 columns without drying up the error message.
> Anyway, I'll make it one line if it's confirmed to be the preferable way to have
> it.
In here there are what I think are multiple ways to get to the same ultimate
device. (indio->dev.parent is used the line above).  Better perhaps to
have one 'dev' that is appropriate for use in both places.

> 
> Thanks,
> Marcelo
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ