From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Andrew Ijano <andrew.ijano@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@intel.com>,
"Colin King (gmail)" <colin.i.king@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>, <nuno.sa@analog.com>,
Andy Shevchenko <andy@kernel.org>,
Gustavo Bastos <gustavobastos@usp.br>,
Julien Stephan <jstephan@baylibre.com>,
<linux-iio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: iio: accel: sca3000: dead code issue
Date: Thu, 3 Jul 2025 11:27:06 +0100 [thread overview]
Message-ID: <20250703112706.0000064d@huawei.com> (raw)
In-Reply-To: <CANZih_Rc3aht-ZTuuEytad8A1d5eC8Z_Dq2GQD8K2QiyFjcBZQ@mail.gmail.com>
On Wed, 2 Jul 2025 23:52:02 -0300
Andrew Ijano <andrew.ijano@gmail.com> wrote:
> On Wed, Jul 2, 2025 at 12:40 PM Jonathan Cameron
> <Jonathan.Cameron@huawei.com> wrote:
> >
> > On Wed, 2 Jul 2025 15:11:26 +0300
> > Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> >
> > > On Wed, Jul 02, 2025 at 10:00:55AM +0100, Colin King (gmail) wrote:
> > >
> > > > ret = spi_w8r8(st->us,
> > > > SCA3000_READ_REG(SCA3000_REG_BUF_COUNT_ADDR));
> > > >
> > > > >>> the call to spi_w8r8 returns 0 on success or -ve on an error
> > >
> > > Where did you get this from, please? Any link to elixir or Git repo?
> > >
> >
> > Hmm. Just for reference the docs of spi_w8r8 are:
> >
> > * Return: the (unsigned) eight bit number returned by the
> > * device, or else a negative error code.
> >
> > Not 0 on success (well not unless it is zero.
> >
> > So the check indeed looks wrong as should be if (ret < 0)
> >
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?h=testing&id=ca66d8208762492df8442a503db568d9aab65f2f
> > It's in my tree.
> >
> > I'll drop the patch when I'm on the right machine. Andrew, could
> > you do a new version fixing this up? If not can make the changes
> > but will be at least the weekend before I get a chance.
> >
>
> Hey, guys! Thanks for pointing this out, I totally missed this problem
> before. I'll try to fix this tomorrow.
>
> In this case, should I send a new version of the patchset fixing the
> problem or a single patch following this commit with the fix?
Given there will probably be some fuzz for the later patches, send
a new version of the whole series.
Thanks
Jonathan
>
> Thanks,
> Andrew
next prev parent reply other threads:[~2025-07-03 10:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 9:00 iio: accel: sca3000: dead code issue Colin King (gmail)
2025-07-02 12:11 ` Andy Shevchenko
2025-07-02 15:40 ` Jonathan Cameron
2025-07-03 2:52 ` Andrew Ijano
2025-07-03 10:27 ` Jonathan Cameron [this message]
2025-07-03 8:00 ` Andy Shevchenko
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=20250703112706.0000064d@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=andrew.ijano@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=colin.i.king@gmail.com \
--cc=dlechner@baylibre.com \
--cc=gustavobastos@usp.br \
--cc=jic23@kernel.org \
--cc=jstephan@baylibre.com \
--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