[PATCH] iio: adc: ad7380: remove unused oversampling_ratio getter

David Lechner posted 1 patch 3 months, 2 weeks ago
drivers/iio/adc/ad7380.c | 5 -----
1 file changed, 5 deletions(-)
[PATCH] iio: adc: ad7380: remove unused oversampling_ratio getter
Posted by David Lechner 3 months, 2 weeks ago
Remove a call to ad7380_get_osr() in ad7380_init_offload_msg. The
returned value is never used.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
I wrote this a while back but it looks like it never got sent so here
it is now.
---
 drivers/iio/adc/ad7380.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/iio/adc/ad7380.c b/drivers/iio/adc/ad7380.c
index d96bd12dfea632b62475d6537c8d6601b042de1f..abcd4cc70074723303b9b67e2b89b0c4b43c6884 100644
--- a/drivers/iio/adc/ad7380.c
+++ b/drivers/iio/adc/ad7380.c
@@ -1165,7 +1165,6 @@ static int ad7380_init_offload_msg(struct ad7380_state *st,
 	struct spi_transfer *xfer = &st->offload_xfer;
 	struct device *dev = &st->spi->dev;
 	const struct iio_scan_type *scan_type;
-	int oversampling_ratio;
 	int ret;
 
 	scan_type = iio_get_current_scan_type(indio_dev,
@@ -1195,10 +1194,6 @@ static int ad7380_init_offload_msg(struct ad7380_state *st,
 		}
 	}
 
-	ret = ad7380_get_osr(st, &oversampling_ratio);
-	if (ret)
-		return ret;
-
 	xfer->bits_per_word = scan_type->realbits;
 	xfer->offload_flags = SPI_OFFLOAD_XFER_RX_STREAM;
 	xfer->len = AD7380_SPI_BYTES(scan_type) * st->chip_info->num_simult_channels;

---
base-commit: b57cb7c47e31244bef6612f271c5dc390f761e17
change-id: 20250624-iio-adc-ad7380-remove-unused-oversampling_ratio-getter-e54413627fe0

Best regards,
-- 
David Lechner <dlechner@baylibre.com>
Re: [PATCH] iio: adc: ad7380: remove unused oversampling_ratio getter
Posted by Nuno Sá 3 months, 1 week ago
On Tue, 2025-06-24 at 22:44 +0000, David Lechner wrote:
> Remove a call to ad7380_get_osr() in ad7380_init_offload_msg. The
> returned value is never used.
> 
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---
> I wrote this a while back but it looks like it never got sent so here
> it is now.
> ---

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

>  drivers/iio/adc/ad7380.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad7380.c b/drivers/iio/adc/ad7380.c
> index
> d96bd12dfea632b62475d6537c8d6601b042de1f..abcd4cc70074723303b9b67e2b89b0c4b43c
> 6884 100644
> --- a/drivers/iio/adc/ad7380.c
> +++ b/drivers/iio/adc/ad7380.c
> @@ -1165,7 +1165,6 @@ static int ad7380_init_offload_msg(struct ad7380_state
> *st,
>  	struct spi_transfer *xfer = &st->offload_xfer;
>  	struct device *dev = &st->spi->dev;
>  	const struct iio_scan_type *scan_type;
> -	int oversampling_ratio;
>  	int ret;
>  
>  	scan_type = iio_get_current_scan_type(indio_dev,
> @@ -1195,10 +1194,6 @@ static int ad7380_init_offload_msg(struct ad7380_state
> *st,
>  		}
>  	}
>  
> -	ret = ad7380_get_osr(st, &oversampling_ratio);
> -	if (ret)
> -		return ret;
> -
>  	xfer->bits_per_word = scan_type->realbits;
>  	xfer->offload_flags = SPI_OFFLOAD_XFER_RX_STREAM;
>  	xfer->len = AD7380_SPI_BYTES(scan_type) * st->chip_info-
> >num_simult_channels;
> 
> ---
> base-commit: b57cb7c47e31244bef6612f271c5dc390f761e17
> change-id: 20250624-iio-adc-ad7380-remove-unused-oversampling_ratio-getter-
> e54413627fe0
> 
> Best regards,
Re: [PATCH] iio: adc: ad7380: remove unused oversampling_ratio getter
Posted by Jonathan Cameron 3 months, 1 week ago
On Fri, 27 Jun 2025 16:56:55 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:

> On Tue, 2025-06-24 at 22:44 +0000, David Lechner wrote:
> > Remove a call to ad7380_get_osr() in ad7380_init_offload_msg. The
> > returned value is never used.
> > 
> > Signed-off-by: David Lechner <dlechner@baylibre.com>
> > ---
> > I wrote this a while back but it looks like it never got sent so here
> > it is now.
> > ---  
> 
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Applied.