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]
Date: Sun, 24 Mar 2024 13:51:10 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Petre Rodan <petre.rodan@...dimension.ro>, Lars-Peter Clausen
 <lars@...afoo.de>, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org, linux-iio@...r.kernel.org
Subject: Re: [PATCH] iio: pressure: hsc030pa: Use spi_read()

On Sun, 24 Mar 2024 13:36:16 +0100
Christophe JAILLET <christophe.jaillet@...adoo.fr> wrote:

> Use spi_read() instead of hand-writing it.
> It is less verbose.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Applied to the togreg-normal branch of iio.git.

Thanks,

Jonathan

> ---
> Compile test only
> ---
>  drivers/iio/pressure/hsc030pa_spi.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/drivers/iio/pressure/hsc030pa_spi.c b/drivers/iio/pressure/hsc030pa_spi.c
> index 818fa6303454..337eecc577d2 100644
> --- a/drivers/iio/pressure/hsc030pa_spi.c
> +++ b/drivers/iio/pressure/hsc030pa_spi.c
> @@ -23,14 +23,9 @@
>  static int hsc_spi_recv(struct hsc_data *data)
>  {
>  	struct spi_device *spi = to_spi_device(data->dev);
> -	struct spi_transfer xfer = {
> -		.tx_buf = NULL,
> -		.rx_buf = data->buffer,
> -		.len = HSC_REG_MEASUREMENT_RD_SIZE,
> -	};
>  
>  	msleep_interruptible(HSC_RESP_TIME_MS);
> -	return spi_sync_transfer(spi, &xfer, 1);
> +	return spi_read(spi, data->buffer, HSC_REG_MEASUREMENT_RD_SIZE);
>  }
>  
>  static int hsc_spi_probe(struct spi_device *spi)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ