From: Javier Carrasco <javier.carrasco.cruz@gmail.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Rishi Gupta" <gupt21@gmail.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Matti Vaittinen" <mazziesaccount@gmail.com>
Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Javier Carrasco <javier.carrasco.cruz@gmail.com>,
Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH v2 1/4] iio: light: veml6030: remove unnecessary read of IT index
Date: Wed, 13 May 2026 17:49:41 +1300 [thread overview]
Message-ID: <20260513-veml6031x00-v2-1-4703ca661a1d@gmail.com> (raw)
In-Reply-To: <20260513-veml6031x00-v2-0-4703ca661a1d@gmail.com>
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.
Fixes: 22eaca4283b2 ("iio: light: veml6030: fix scale to conform to ABI")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
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 6bcacae3863c..745cf3ad7092 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)
--
2.43.0
next prev parent reply other threads:[~2026-05-13 4:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 4:49 [PATCH v2 0/4] iio: light: add support for veml6031x00 ALS series Javier Carrasco
2026-05-13 4:49 ` Javier Carrasco [this message]
2026-05-13 4:49 ` [PATCH v2 2/4] iio: light: veml6030: fix channel type when pushing events Javier Carrasco
2026-05-13 4:49 ` [PATCH v2 3/4] dt-bindings: iio: light: veml6030: add veml6031x00 ALS series Javier Carrasco
2026-05-13 4:49 ` [PATCH v2 4/4] iio: light: add support for " Javier Carrasco
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=20260513-veml6031x00-v2-1-4703ca661a1d@gmail.com \
--to=javier.carrasco.cruz@gmail.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=gupt21@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mazziesaccount@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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