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] [thread-next>] [day] [month] [year] [list]
Message-ID: <eb36242b-ac82-412c-b14b-648d541dcec1@sirena.org.uk>
Date: Tue, 2 Dec 2025 16:36:47 +0000
From: Mark Brown <broonie@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...el.com>
Cc: David Lechner <dlechner@...libre.com>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Marcelo Schmitt <marcelo.schmitt@...log.com>,
	Michael Hennerich <michael.hennerich@...log.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Jonathan Cameron <jic23@...nel.org>,
	Andy Shevchenko <andy@...nel.org>,
	Sean Anderson <sean.anderson@...ux.dev>, linux-spi@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-iio@...r.kernel.org
Subject: Re: [PATCH v3 4/7] spi: axi-spi-engine: support
 SPI_MULTI_LANE_MODE_STRIPE

On Tue, Dec 02, 2025 at 04:53:47PM +0200, Andy Shevchenko wrote:
> On Mon, Dec 01, 2025 at 08:20:42PM -0600, David Lechner wrote:
> > Add support for SPI_MULTI_LANE_MODE_STRIPE to the AXI SPI engine driver.

> > +static u8 spi_engine_all_lane_flags(struct spi_device *spi)
> > +{
> > +	u8 flags = 0;

> > +	int i;

> Why signed?
> 
> > +	for (i = 0; i < spi->num_data_lanes; i++)
> > +		flags |= BIT(spi->data_lanes[i]);
> > +
> > +	return flags;

Variables called i used for iteration are typically declared signed even
if they never cover negative values; IIRC there used to be some
compiler interaction reasons to do so although I expect those aren't so
relevant any more.  Using a signed type here is perfectly normal.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ