[PATCH] spi: mxc_spi: remove redundant code in spi_xchg_single()

li.haolin at qq.com li.haolin at qq.com
Sat Nov 6 11:03:34 CET 2021


From: Haolin Li <li.haolin at qq.com>

The value of cnt is overwritten without being used.

Signed-off-by: Haolin Li <li.haolin at qq.com>
---
 drivers/spi/mxc_spi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 3c53de165d..5adfdf8b5f 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -391,8 +391,6 @@ int spi_xchg_single(struct mxc_spi_slave *mxcs, unsigned int bitlen,
 
 	nbytes = DIV_ROUND_UP(bitlen, 8);
 
-	cnt = nbytes % 32;
-
 	if (bitlen % 32) {
 		data = reg_read(&regs->rxdata);
 		cnt = (bitlen % 32) / 8;
-- 
2.25.1



More information about the U-Boot mailing list