public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>,
	Angelo Dureghello <adureghello@baylibre.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich	 <Michael.Hennerich@analog.com>,
	Nuno Sa <nuno.sa@analog.com>,
	Jonathan Cameron	 <Jonathan.Cameron@huawei.com>,
	linux-iio@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: dac: adi-axi-dac: drop io_mode check
Date: Mon, 10 Feb 2025 10:05:47 +0000	[thread overview]
Message-ID: <2ae962c19bc9d180dabf52e256a1d6bf215f9bf0.camel@gmail.com> (raw)
In-Reply-To: <20250208154521.193da461@jic23-huawei>

On Sat, 2025-02-08 at 15:45 +0000, Jonathan Cameron wrote:
> On Thu, 06 Feb 2025 09:36:14 +0100
> Angelo Dureghello <adureghello@baylibre.com> wrote:
> 
> > From: Angelo Dureghello <adureghello@baylibre.com>
> > 
> > Drop mode check, producing the following robot test warning:
> > 
> > smatch warnings:
> > drivers/iio/dac/adi-axi-dac.c:731 axi_dac_bus_set_io_mode()
> >   warn: always true condition '(mode >= 0) => (0-u32max >= 0)'
> > 
> > The range check results not useful since these are the only
> > plausible modes for enum ad3552r_io_mode.
> > 
> > Fixes: 493122c53af1 ("iio: dac: adi-axi-dac: add bus mode setup")
> > Signed-off-by: Angelo Dureghello <adureghello@baylibre.com>
> Ah. I missed this.  Anyhow made the same change directly so all is well
> than ends well!
> 

Hi Angelo, Jonathan,

I wanted to reply to this one when I saw it but I haven't done right away and
then totally forgot. Sorry about that!

I don't really agree with the "fix" in this patch. AFAIU, smatch is complaining
since the enum is apparently defaulting to an unsigned type which means doing
the >= 0 check is useless. But we should keep the upper bound...

- Nuno Sá


  reply	other threads:[~2025-02-10 10:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-06  8:36 [PATCH] iio: dac: adi-axi-dac: drop io_mode check Angelo Dureghello
2025-02-08 15:45 ` Jonathan Cameron
2025-02-10 10:05   ` Nuno Sá [this message]
2025-02-10 19:13     ` Jonathan Cameron
2025-02-11  9:56       ` Nuno Sá
2025-02-11 19:28         ` Jonathan Cameron

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=2ae962c19bc9d180dabf52e256a1d6bf215f9bf0.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=adureghello@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@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