Re: [PATCH] spi: Skip zero-length transfers in spi_transfer_one_message()

From: Mark Brown
Date: Fri Feb 12 2021 - 08:13:55 EST


On Fri, Feb 12, 2021 at 01:57:24PM +0100, Geert Uytterhoeven wrote:
> On Fri, Feb 12, 2021 at 1:55 PM Mark Brown <broonie@xxxxxxxxxx> wrote:

> > No, I think it's fine - there's probably some sensible use case with
> > drivers reusing a statically allocated transfer/buffer set for multiple
> > operations and just tweaking the length as needed which seems a bit
> > weird but I can't think of a reason not to allow it. Your patch is
> > currently queued, all being well it'll get tested & pushed out later
> > today.

> Aren't the zero-length transfers also used to do tricks with the CS signal,
> e.g. combined with cs_change?

The issue wasn't that things were using zero length transfers, the issue
was that drivers were doing zero length transfers but also passing data
buffers which isn't an obvious thing to do given that there will be no
data in those buffers.

Attachment: signature.asc
Description: PGP signature