From: Jonathan Cameron <jic23@kernel.org>
To: Qianfeng Rong <rongqianfeng@vivo.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: dac: use int instead of u32 to store error codes
Date: Sun, 31 Aug 2025 16:27:46 +0100 [thread overview]
Message-ID: <20250831162746.7dab74c2@jic23-huawei> (raw)
In-Reply-To: <20250826101825.248167-1-rongqianfeng@vivo.com>
On Tue, 26 Aug 2025 18:18:25 +0800
Qianfeng Rong <rongqianfeng@vivo.com> wrote:
> Use int instead of unsigned int for 'ret' variable to store negative error
> codes returned by ad5421_write_unlocked() and ad5360_write_unlocked().
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
This is a fix, so needs a fixes tag.
Given the two drivers were introduced in separate patches
I would suggest splitting this into two different patches so
we can call out how far to backport each one (via the appropriate
fixes tags!)
> ---
> drivers/iio/dac/ad5360.c | 2 +-
> drivers/iio/dac/ad5421.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/dac/ad5360.c b/drivers/iio/dac/ad5360.c
> index a57b0a093112..8271849b1c83 100644
> --- a/drivers/iio/dac/ad5360.c
> +++ b/drivers/iio/dac/ad5360.c
> @@ -262,7 +262,7 @@ static int ad5360_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
> unsigned int clr)
> {
> struct ad5360_state *st = iio_priv(indio_dev);
> - unsigned int ret;
> + int ret;
>
> mutex_lock(&st->lock);
>
> diff --git a/drivers/iio/dac/ad5421.c b/drivers/iio/dac/ad5421.c
> index 1462ee640b16..d9d7031c4432 100644
> --- a/drivers/iio/dac/ad5421.c
> +++ b/drivers/iio/dac/ad5421.c
> @@ -186,7 +186,7 @@ static int ad5421_update_ctrl(struct iio_dev *indio_dev, unsigned int set,
> unsigned int clr)
> {
> struct ad5421_state *st = iio_priv(indio_dev);
> - unsigned int ret;
> + int ret;
>
> mutex_lock(&st->lock);
>
next prev parent reply other threads:[~2025-08-31 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 10:18 [PATCH] iio: dac: use int instead of u32 to store error codes Qianfeng Rong
2025-08-26 13:42 ` David Lechner
2025-08-31 15:27 ` Jonathan Cameron [this message]
2025-09-01 11:55 ` Qianfeng Rong
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=20250831162746.7dab74c2@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=rongqianfeng@vivo.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