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: <20250201125730.1794a852@jic23-huawei>
Date: Sat, 1 Feb 2025 12:57:30 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Angelo Dureghello <adureghello@...libre.com>
Cc: Michael Hennerich <michael.hennerich@...log.com>, Lars-Peter Clausen
 <lars@...afoo.de>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
 <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Alexandru
 Ardelean <aardelean@...libre.com>, David Lechner <dlechner@...libre.com>,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>,
 linux-fbdev@...r.kernel.org, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, Guillaume Stols
 <gstols@...libre.com>
Subject: Re: [PATCH v3 03/10] iio: adc: ad7606: fix wrong scale available

On Wed, 29 Jan 2025 12:03:04 +0100
Angelo Dureghello <adureghello@...libre.com> wrote:

> From: Angelo Dureghello <adureghello@...libre.com>
> 
> Fix wrong scale available list since only one value is returned:
> 
> ...
> iio:device1: ad7606b (buffer capable)
>     8 channels found:
>            voltage0:  (input, index: 0, format: le:S16/16>>0)
>            2 channel-specific attributes found:
>                  attr  0: scale value: 0.305176
>                  attr  1: scale_available value: 0.076293
> Fix as:
>            voltage0:  (input, index: 0, format: le:S16/16>>0)
>            2 channel-specific attributes found:
>                  attr  0: scale value: 0.305176
>                  attr  1: scale_available value: 0.076293 0.152588 0.305176
> 
> Fixes: 97c6d857041d ("iio: adc: ad7606: rework scale-available to be static")
> Signed-off-by: Angelo Dureghello <adureghello@...libre.com>
Applied to the fixes-togreg branch of iio.git

Thanks,

Jonathan

> ---
>  drivers/iio/adc/ad7606.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
> index d8e3c7a43678..d39354afd539 100644
> --- a/drivers/iio/adc/ad7606.c
> +++ b/drivers/iio/adc/ad7606.c
> @@ -1047,7 +1047,7 @@ static int ad7606_read_avail(struct iio_dev *indio_dev,
>  
>  		cs = &st->chan_scales[ch];
>  		*vals = (int *)cs->scale_avail;
> -		*length = cs->num_scales;
> +		*length = cs->num_scales * 2;
>  		*type = IIO_VAL_INT_PLUS_MICRO;
>  
>  		return IIO_AVAIL_LIST;
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ