]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: mxc_spi: remove redundant code in spi_xchg_single()
authorHaolin Li <li.haolin@qq.com>
Sat, 6 Nov 2021 10:03:34 +0000 (03:03 -0700)
committerStefano Babic <sbabic@denx.de>
Sat, 5 Feb 2022 12:38:39 +0000 (13:38 +0100)
The value of cnt is overwritten without being used.

Signed-off-by: Haolin Li <li.haolin@qq.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
drivers/spi/mxc_spi.c

index 3c53de165dd6e12621a85d55bb444227e0407b31..5adfdf8b5fc68eaaecc8bea6861805bd8b77208f 100644 (file)
@@ -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;