Re: [PATCH v3 4/7] spi: axi-spi-engine: support SPI_MULTI_LANE_MODE_STRIPE
From: Mark Brown
Date: Tue Dec 02 2025 - 11:37:19 EST
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.
Attachment:
signature.asc
Description: PGP signature