Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Cc: "David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rishi Gupta" <gupt21@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] iio: light: veml6030: remove unnecessary read of IT index
Date: Sat, 16 May 2026 14:06:27 +0100	[thread overview]
Message-ID: <20260516140627.5c8912f7@jic23-huawei> (raw)
In-Reply-To: <20260514-veml6030-fixes-v2-2-abdd5837be50@gmail.com>

On Thu, 14 May 2026 14:01:12 +1300
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:

> This is dead code as the IT index is not used by gts to set the new scale.
> In its current form, the value is read but not used afterward. Remove
> the dead code.
> 
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Dropped previous version and picked this up instead.

Thanks,

Jonathan

> ---
>  drivers/iio/light/veml6030.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/light/veml6030.c b/drivers/iio/light/veml6030.c
> index da8c32cabfd6..2f9a25d59b71 100644
> --- a/drivers/iio/light/veml6030.c
> +++ b/drivers/iio/light/veml6030.c
> @@ -521,13 +521,9 @@ static int veml6030_write_persistence(struct iio_dev *indio_dev,
>  
>  static int veml6030_set_scale(struct iio_dev *indio_dev, int val, int val2)
>  {
> -	int ret, gain_sel, it_idx, it_sel;
> +	int ret, gain_sel, it_sel;
>  	struct veml6030_data *data = iio_priv(indio_dev);
>  
> -	ret = regmap_field_read(data->rf.it, &it_idx);
> -	if (ret)
> -		return ret;
> -
>  	ret = iio_gts_find_gain_time_sel_for_scale(&data->gts, val, val2,
>  						   &gain_sel, &it_sel);
>  	if (ret)
> 


      reply	other threads:[~2026-05-16 13:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-14  1:01 [PATCH v2 0/2] iio: light: veml6030: fix channel type for events and remove unused read Javier Carrasco
2026-05-14  1:01 ` [PATCH v2 1/2] iio: light: veml6030: fix channel type when pushing events Javier Carrasco
2026-05-16 13:09   ` Jonathan Cameron
2026-05-14  1:01 ` [PATCH v2 2/2] iio: light: veml6030: remove unnecessary read of IT index Javier Carrasco
2026-05-16 13:06   ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260516140627.5c8912f7@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gupt21@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox