linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: dac: use int instead of u32 to store error codes
@ 2025-08-26 10:18 Qianfeng Rong
  2025-08-26 13:42 ` David Lechner
  2025-08-31 15:27 ` Jonathan Cameron
  0 siblings, 2 replies; 4+ messages in thread
From: Qianfeng Rong @ 2025-08-26 10:18 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	David Lechner, Nuno Sá, Andy Shevchenko, linux-iio,
	linux-kernel
  Cc: Qianfeng Rong

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>
---
 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);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-01 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-09-01 11:55   ` Qianfeng Rong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).