mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Haotian Zhang <vulab@iscas.ac.cn>,
	lars@metafoo.de, michael.hennerich@analog.com,
	dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ad7606: Fix incorrect type for error return variable
Date: Sun, 7 Dec 2025 12:56:47 +0000	[thread overview]
Message-ID: <20251207125647.7306b84f@jic23-huawei> (raw)
In-Reply-To: <CAHp75Vf=GOsvXsCmbKzpiui2=jbetTkm9Yru9ZCp9T0+txMF-g@mail.gmail.com>

On Wed, 3 Dec 2025 11:16:26 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Wed, Dec 3, 2025 at 7:09 AM Haotian Zhang <vulab@iscas.ac.cn> wrote:
> >
> > The variable ret is declared as unsigned int but is used to store return
> > values from functions returning int, which may be negative error codes.
> >
> > Change ret from unsigned int to int.  
> 
> > Fixes: 849cebf8dc67 ("iio: adc: ad7606: Add iio-backend support")  
> 
> Since it returns an int, it is just double conversion (however in the
> standard promotion from unsigned to signed is UB if I remember
> correctly). That said, I am not sure this justifies the Fixes tag, but
> I'm not against it.
> 
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
> 
I think it is worth getting this backported as it's definitely wrong
if not an actual bug so I'll keep the fixes tag and take it via my fixes
branch.

Thanks,

Jonathan


      reply	other threads:[~2025-12-07 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03  5:08 Haotian Zhang
2025-12-03  9:16 ` Andy Shevchenko
2025-12-07 12:56   ` 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=20251207125647.7306b84f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=andy.shevchenko@gmail.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=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=vulab@iscas.ac.cn \
    /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

all inboxes | Powered by JetHome®