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: <a3329058-2b2d-415a-5d2a-0bdf2f97d23d@geanix.com>
Date:   Wed, 19 May 2021 07:37:16 +0200
From:   Sean Nyekjaer <sean@...nix.com>
To:     trix@...hat.com, jic23@...nel.org, lars@...afoo.de,
        andy.shevchenko@...il.com
Cc:     linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: accel: fxls8962af: conditionally compile
 fxls8962af_i2c_raw_read_errata3()

On 19/05/2021 01.48, trix@...hat.com wrote:
> From: Tom Rix <trix@...hat.com>
> 
> The build is failing with this link error
> ld: fxls8962af-core.o: in function `fxls8962af_fifo_transfer':
> fxls8962af-core.c: undefined reference to `i2c_verify_client'
> 
> This is needed for the i2c variant, not the spi variant. So
> conditionally compile based on CONFIG_FXLS8962AF_I2C.
> 
Fixes: 68068fad0e1c ("iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads")
> Signed-off-by: Tom Rix <trix@...hat.com>
Reviewed-by: Sean Nyekjaer <sean@...nix.com>
> ---
>  drivers/iio/accel/fxls8962af-core.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
> index 9fe5a18a605cc..b6d833e2058c8 100644
> --- a/drivers/iio/accel/fxls8962af-core.c
> +++ b/drivers/iio/accel/fxls8962af-core.c
> @@ -624,6 +624,7 @@ static const struct iio_buffer_setup_ops fxls8962af_buffer_ops = {
>  	.postdisable = fxls8962af_buffer_postdisable,
>  };
>  
> +#if IS_ENABLED(CONFIG_FXLS8962AF_I2C)
>  static int fxls8962af_i2c_raw_read_errata3(struct fxls8962af_data *data,
>  					   u16 *buffer, int samples,
>  					   int sample_length)
> @@ -639,6 +640,7 @@ static int fxls8962af_i2c_raw_read_errata3(struct fxls8962af_data *data,
>  
>  	return ret;
>  }
> +#endif
>  
>  static int fxls8962af_fifo_transfer(struct fxls8962af_data *data,
>  				    u16 *buffer, int samples)
> @@ -648,6 +650,7 @@ static int fxls8962af_fifo_transfer(struct fxls8962af_data *data,
>  	int total_length = samples * sample_length;
>  	int ret;
>  
> +#if IS_ENABLED(CONFIG_FXLS8962AF_I2C)
>  	if (i2c_verify_client(dev))
>  		/*
>  		 * Due to errata bug:
> @@ -657,6 +660,7 @@ static int fxls8962af_fifo_transfer(struct fxls8962af_data *data,
>  		ret = fxls8962af_i2c_raw_read_errata3(data, buffer, samples,
>  						      sample_length);
>  	else
> +#endif
>  		ret = regmap_raw_read(data->regmap, FXLS8962AF_BUF_X_LSB, buffer,
>  				      total_length);
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ