From: Mark Brown <broonie@kernel.org>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: Robin Murphy <robin.murphy@arm.com>,
Phil Elwell <phil@raspberrypi.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: Skip zero-length transfers in spi_transfer_one_message()
Date: Fri, 12 Feb 2021 12:31:18 +0000 [thread overview]
Message-ID: <20210212123118.GB6057@sirena.org.uk> (raw)
In-Reply-To: <20210211180820.25757-1-nsaenzjulienne@suse.de>
[-- Attachment #1: Type: text/plain, Size: 432 bytes --]
On Thu, Feb 11, 2021 at 07:08:20PM +0100, Nicolas Saenz Julienne wrote:
> - if (xfer->tx_buf || xfer->rx_buf) {
> + if ((xfer->tx_buf || xfer->rx_buf) && xfer->len) {
I think the issue here is more that some users were passing in buffers
with zero length transfers, the above check was already intended to
catch this case but was working on the assumption that if there was
nothing to transfer then no buffer would be provided.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-02-12 12:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 18:08 Nicolas Saenz Julienne
2021-02-12 12:31 ` Mark Brown [this message]
2021-02-12 12:48 ` Nicolas Saenz Julienne
2021-02-12 12:52 ` Mark Brown
2021-02-12 12:57 ` Geert Uytterhoeven
2021-02-12 13:05 ` Mark Brown
2021-02-12 14:01 ` Mark Brown
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=20210212123118.GB6057@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=nsaenzjulienne@suse.de \
--cc=phil@raspberrypi.com \
--cc=robin.murphy@arm.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
all inboxes | Powered by JetHome®