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] [day] [month] [year] [list]
Message-ID: <4bf1afcd8c913cdf3b48b72cd74d5255a6413cf9.camel@analog.com>
Date:   Mon, 16 Sep 2019 06:58:08 +0000
From:   "Ardelean, Alexandru" <alexandru.Ardelean@...log.com>
To:     "jic23@...nel.org" <jic23@...nel.org>
CC:     "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "broonie@...nel.org" <broonie@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>
Subject: Re: [PATCH v2 4/4] iio: imu: adis: convert cs_change_delay to
 spi_delay struct

On Sun, 2019-09-15 at 11:14 +0100, Jonathan Cameron wrote:
> [External]
> 
> On Fri, 13 Sep 2019 14:55:49 +0300
> Alexandru Ardelean <alexandru.ardelean@...log.com> wrote:
> 
> > The ADIS library is one of the few users of the new `cs_change_delay`
> > parameter for an spi_transfer.
> > 
> > The introduction of the `spi_delay` struct, requires that the users of of
> > `cs_change_delay` get an update. This change updates the ADIS library.
> > 
> > Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
> 
> Looks to me like the build is broken between patches 3 and 4.
> Don't do that as it breaks bisectability.
> 
> If you are changing an interface like this it has to occur in one patch,
> of you have to have intermediate code that deals with the smooth transition.
> 
> Otherwise, looks like a sensible bit of rework to me.

I thought about it, but wasn't sure.
Will create a v3 with patches 3 & 4 squashed.

Thanks
Alex

> 
> Jonathan
> 
> > ---
> >  drivers/iio/imu/adis.c | 24 ++++++++++++------------
> >  1 file changed, 12 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
> > index 1631c255deab..2cd2cc2316c6 100644
> > --- a/drivers/iio/imu/adis.c
> > +++ b/drivers/iio/imu/adis.c
> > @@ -39,24 +39,24 @@ int adis_write_reg(struct adis *adis, unsigned int reg,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->write_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 2,
> >  			.bits_per_word = 8,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->write_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 4,
> >  			.bits_per_word = 8,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->write_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 6,
> >  			.bits_per_word = 8,
> > @@ -139,16 +139,16 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->write_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 2,
> >  			.bits_per_word = 8,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->read_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.tx_buf = adis->tx + 4,
> >  			.rx_buf = adis->rx,
> > @@ -156,8 +156,8 @@ int adis_read_reg(struct adis *adis, unsigned int reg,
> >  			.len = 2,
> >  			.cs_change = 1,
> >  			.delay_usecs = adis->data->read_delay,
> > -			.cs_change_delay = adis->data->cs_change_delay,
> > -			.cs_change_delay_unit = SPI_DELAY_UNIT_USECS,
> > +			.cs_change_delay.value = adis->data->cs_change_delay,
> > +			.cs_change_delay.unit = SPI_DELAY_UNIT_USECS,
> >  		}, {
> >  			.rx_buf = adis->rx + 2,
> >  			.bits_per_word = 8,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ