diff mbox series

[3/6] Revert "spi: stm32: properly handle 0 byte transfer"

Message ID 1625042723-661-4-git-send-email-alain.volmat@foss.st.com (mailing list archive)
State New, archived
Headers show
Series spi: stm32: various fixes & cleanup | expand

Commit Message

Alain Volmat June 30, 2021, 8:45 a.m. UTC
This reverts commit 2269f5a8b1a7b38651d62676b98182828f29d11a.
0 byte transfer handling is now done within the core in code added
by commit b306320322c9 ("spi: Skip zero-length transfers in spi_transfer_one_message()")

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
---
 drivers/spi/spi-stm32.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Mark Brown June 30, 2021, 12:34 p.m. UTC | #1
On Wed, Jun 30, 2021 at 10:45:20AM +0200, Alain Volmat wrote:
> This reverts commit 2269f5a8b1a7b38651d62676b98182828f29d11a.
> 0 byte transfer handling is now done within the core in code added
> by commit b306320322c9 ("spi: Skip zero-length transfers in spi_transfer_one_message()")

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.
diff mbox series

Patch

diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 4dbd5cbe0c11..d37bfead4d8c 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -1647,10 +1647,6 @@  static int stm32_spi_transfer_one(struct spi_master *master,
 	struct stm32_spi *spi = spi_master_get_devdata(master);
 	int ret;
 
-	/* Don't do anything on 0 bytes transfers */
-	if (transfer->len == 0)
-		return 0;
-
 	spi->tx_buf = transfer->tx_buf;
 	spi->rx_buf = transfer->rx_buf;
 	spi->tx_len = spi->tx_buf ? transfer->len : 0;