[PATCH] spi: rzv2h-rspi: fix incorrect readl() accessor for 8-bit RX path

Felix Gu posted 1 patch 2 days, 13 hours ago
drivers/spi/spi-rzv2h-rspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] spi: rzv2h-rspi: fix incorrect readl() accessor for 8-bit RX path
Posted by Felix Gu 2 days, 13 hours ago
The RZV2H_RSPI_RX macro instantiation for u8 data incorrectly uses
readl(). It performs a 32-bit read which can consume excess data and
cause corruption.

Fixes: 8b61c8919dff ("spi: Add driver for the RZ/V2H(P) RSPI IP")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/spi/spi-rzv2h-rspi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-rzv2h-rspi.c b/drivers/spi/spi-rzv2h-rspi.c
index 1655efda7d20..1406885ccede 100644
--- a/drivers/spi/spi-rzv2h-rspi.c
+++ b/drivers/spi/spi-rzv2h-rspi.c
@@ -137,7 +137,7 @@ RZV2H_RSPI_TX(writew, u16)
 RZV2H_RSPI_TX(writeb, u8)
 RZV2H_RSPI_RX(readl, u32)
 RZV2H_RSPI_RX(readw, u16)
-RZV2H_RSPI_RX(readl, u8)
+RZV2H_RSPI_RX(readb, u8)
 
 static void rzv2h_rspi_reg_rmw(const struct rzv2h_rspi_priv *rspi,
 				int reg_offs, u32 bit_mask, u32 value)

---
base-commit: a225caacc36546a09586e3ece36c0313146e7da9
change-id: 20260605-rzv2h-rspi-3c8dd168fb72

Best regards,
--  
Felix Gu <ustc.gu@gmail.com>