lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250703112706.0000064d@huawei.com>
Date: Thu, 3 Jul 2025 11:27:06 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Andrew Ijano <andrew.ijano@...il.com>
CC: Andy Shevchenko <andriy.shevchenko@...el.com>, "Colin King (gmail)"
	<colin.i.king@...il.com>, Jonathan Cameron <jic23@...nel.org>, "David
 Lechner" <dlechner@...libre.com>, <nuno.sa@...log.com>, Andy Shevchenko
	<andy@...nel.org>, Gustavo Bastos <gustavobastos@....br>, Julien Stephan
	<jstephan@...libre.com>, <linux-iio@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: iio: accel: sca3000: dead code issue

On Wed, 2 Jul 2025 23:52:02 -0300
Andrew Ijano <andrew.ijano@...il.com> wrote:

> On Wed, Jul 2, 2025 at 12:40 PM Jonathan Cameron
> <Jonathan.Cameron@...wei.com> wrote:
> >
> > On Wed, 2 Jul 2025 15:11:26 +0300
> > Andy Shevchenko <andriy.shevchenko@...el.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ