From: Joshua Crofts <joshua.crofts1@gmail.com>
To: "Jonathan Cameron" <jonathan.cameron@oss.qualcomm.com>,
"Nuno Sá" <nuno.sa@analog.com>
Cc: linux-iio@vger.kernel.org, David Lechner <dlechner@baylibre.com>,
Andy Shevchenko <andy@kernel.org>
Subject: Re: [PATCH 12/22] iio: dac: max517: Remove redundant i2c_master_send() length check
Date: Thu, 16 Jul 2026 09:45:14 +0200 [thread overview]
Message-ID: <20260716094514.00001eaa@gmail.com> (raw)
In-Reply-To: <20260716005737.254577-13-jonathan.cameron@oss.qualcomm.com>
On Wed, 15 Jul 2026 17:57:27 -0700
Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> wrote:
> i2c_master_send() returns either a negative errno or exactly the count
> passed in, so the length check after the 'ret < 0' test can never be
> true. Drop the dead branch.
>
> Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
> Assisted-by: Claude:claude-opus-4-8
> ---
> drivers/iio/dac/max517.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c
> index d2ddc72e0e50..e0d1a26c4f73 100644
> --- a/drivers/iio/dac/max517.c
> +++ b/drivers/iio/dac/max517.c
> @@ -55,10 +55,8 @@ static int max517_set_value(struct iio_dev *indio_dev,
> res = i2c_master_send(client, outbuf, 2);
Someone should also remove all the hard-coded sizes, they appear in multiple
drivers you're touching.
--
Kind regards
CJD
next prev parent reply other threads:[~2026-07-16 7:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 0:57 [RESEND PATCH 00/22] IIO: Clean out superfluous I2C checks for single transfers Jonathan Cameron
2026-07-16 0:57 ` [PATCH 01/22] iio: adc: ltc2471: Remove redundant i2c_master_recv() length check Jonathan Cameron
2026-07-16 0:57 ` [PATCH 02/22] iio: adc: ti-ads7138: Remove redundant i2c_master_send() length checks Jonathan Cameron
2026-07-16 0:57 ` [PATCH 03/22] iio: adc: versal-sysmon: Remove redundant i2c_master_{send,recv}() " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 04/22] iio: chemical: scd30: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 05/22] iio: chemical: scd4x: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 06/22] iio: chemical: sgp30: Remove redundant i2c_master_recv() length check Jonathan Cameron
2026-07-16 0:57 ` [PATCH 07/22] iio: chemical: sgp40: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 08/22] iio: chemical: sps30: Remove redundant i2c_master_{send,recv}() length checks Jonathan Cameron
2026-07-16 0:57 ` [PATCH 09/22] iio: dac: ad5446: Remove redundant i2c_master_send() length check Jonathan Cameron
2026-07-16 0:57 ` [PATCH 10/22] iio: dac: ad5696: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 11/22] iio: dac: m62332: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 12/22] iio: dac: max517: " Jonathan Cameron
2026-07-16 7:45 ` Joshua Crofts [this message]
2026-07-16 0:57 ` [PATCH 13/22] iio: dac: max5821: Remove redundant i2c_master_{send,recv}() length checks Jonathan Cameron
2026-07-16 0:57 ` [PATCH 14/22] iio: dac: mcp4725: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 15/22] iio: dac: mcp4728: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 16/22] iio: light: lv0104cs: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 17/22] iio: potentiometer: ad5110: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 18/22] iio: pressure: abp2030pa: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 19/22] iio: pressure: adp810: " Jonathan Cameron
2026-07-16 0:57 ` [PATCH 20/22] iio: pressure: icp10100: Remove redundant i2c_master_send() length check Jonathan Cameron
2026-07-16 0:57 ` [PATCH 21/22] iio: pressure: mprls0025pa: Remove redundant i2c_master_{send,recv}() length checks Jonathan Cameron
2026-07-16 0:57 ` [PATCH 22/22] iio: pressure: sdp500: Remove redundant i2c_master_recv() length check Jonathan Cameron
2026-07-16 8:01 ` [RESEND PATCH 00/22] IIO: Clean out superfluous I2C checks for single transfers Joshua Crofts
2026-07-16 10:15 ` Nuno Sá
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=20260716094514.00001eaa@gmail.com \
--to=joshua.crofts1@gmail.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jonathan.cameron@oss.qualcomm.com \
--cc=linux-iio@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