From: Mark Brown <broonie@kernel.org> To: Alain Volmat <alain.volmat@foss.st.com> Cc: amelie.delaunay@foss.st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-spi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, fabrice.gasnier@foss.st.com Subject: Re: [PATCH 1/8] spi: stm32: properly handle 0 byte transfer Date: Fri, 5 Feb 2021 13:29:42 +0000 [thread overview] Message-ID: <20210205132942.GA4720@sirena.org.uk> (raw) In-Reply-To: <1612523342-10466-2-git-send-email-alain.volmat@foss.st.com> [-- Attachment #1: Type: text/plain, Size: 398 bytes --] On Fri, Feb 05, 2021 at 12:08:55PM +0100, Alain Volmat wrote: > On 0 byte transfer request, return straight from the > xfer function after finalizing the transfer. > + if (transfer->len == 0) { > + spi_finalize_current_transfer(master); > + return 0; The driver only needs to finalize the transfer if it returned a value greater than 0, returning 0 indicates that the transfer is already done. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org> To: Alain Volmat <alain.volmat@foss.st.com> Cc: linux-kernel@vger.kernel.org, alexandre.torgue@foss.st.com, linux-spi@vger.kernel.org, amelie.delaunay@foss.st.com, fabrice.gasnier@foss.st.com, mcoquelin.stm32@gmail.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 1/8] spi: stm32: properly handle 0 byte transfer Date: Fri, 5 Feb 2021 13:29:42 +0000 [thread overview] Message-ID: <20210205132942.GA4720@sirena.org.uk> (raw) In-Reply-To: <1612523342-10466-2-git-send-email-alain.volmat@foss.st.com> [-- Attachment #1.1: Type: text/plain, Size: 398 bytes --] On Fri, Feb 05, 2021 at 12:08:55PM +0100, Alain Volmat wrote: > On 0 byte transfer request, return straight from the > xfer function after finalizing the transfer. > + if (transfer->len == 0) { > + spi_finalize_current_transfer(master); > + return 0; The driver only needs to finalize the transfer if it returned a value greater than 0, returning 0 indicates that the transfer is already done. [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] [-- Attachment #2: Type: text/plain, Size: 176 bytes --] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-02-06 0:07 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-05 11:08 [PATCH 0/8] spi: stm32: fix and enhancements for spi-stm32 Alain Volmat 2021-02-05 11:08 ` Alain Volmat 2021-02-05 11:08 ` [PATCH 1/8] spi: stm32: properly handle 0 byte transfer Alain Volmat 2021-02-05 11:08 ` Alain Volmat 2021-02-05 13:29 ` Mark Brown [this message] 2021-02-05 13:29 ` Mark Brown 2021-02-05 11:08 ` [PATCH 2/8] spi: stm32: do not mandate cs_gpio Alain Volmat 2021-02-05 11:08 ` Alain Volmat 2021-02-05 11:08 ` [PATCH 3/8] spi: stm32h7: ensure message are smaller than max size Alain Volmat 2021-02-05 11:08 ` Alain Volmat 2021-02-05 11:08 ` [PATCH 4/8] spi: stm32: driver uses reset controller only at init Alain Volmat 2021-02-05 11:08 ` Alain Volmat 2021-02-05 11:08 ` [PATCH 5/8] spi: stm32: defer probe for reset Alain Volmat 2021-02-05 11:08 ` Alain Volmat 2021-02-05 16:41 ` Mark Brown 2021-02-05 16:41 ` Mark Brown 2021-02-05 17:23 ` Alain Volmat 2021-02-05 17:23 ` Alain Volmat 2021-02-05 11:09 ` [PATCH 6/8] spi: stm32: use bitfield macros Alain Volmat 2021-02-05 11:09 ` Alain Volmat 2021-02-05 11:09 ` [PATCH 7/8] spi: stm32h7: replace private SPI_1HZ_NS with NSEC_PER_SEC Alain Volmat 2021-02-05 11:09 ` Alain Volmat 2021-02-05 11:09 ` [PATCH 8/8] spi: stm32: make spurious and overrun interrupts visible Alain Volmat 2021-02-05 11:09 ` Alain Volmat 2021-02-05 20:16 ` (subset) [PATCH 0/8] spi: stm32: fix and enhancements for spi-stm32 Mark Brown 2021-02-05 20:16 ` 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=20210205132942.GA4720@sirena.org.uk \ --to=broonie@kernel.org \ --cc=alain.volmat@foss.st.com \ --cc=alexandre.torgue@foss.st.com \ --cc=amelie.delaunay@foss.st.com \ --cc=fabrice.gasnier@foss.st.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-spi@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=mcoquelin.stm32@gmail.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.