Fix unused variable warning in rockchip's rk_spi.c
With clang 15, the following -Werror warning is produced: sys/arm64/rockchip/rk_spi.c:229:6: error: variable 'cnt' set but not used [-Werror,-Wunused-but-set-variable] int cnt = 0; ^ The 'cnt' variable was in rk_spi.c when it was first added, but it appears to have been a debugging aid that has never been used, so remove it. MFC after: 3 days
This commit is contained in:
parent
762dcf1064
commit
0fe8ab6851
@ -226,12 +226,10 @@ rk_spi_fill_txfifo(struct rk_spi_softc *sc)
|
||||
{
|
||||
uint32_t txlevel;
|
||||
txlevel = RK_SPI_READ_4(sc, RK_SPI_TXFLR);
|
||||
int cnt = 0;
|
||||
|
||||
while (sc->txidx < sc->txlen && txlevel < sc->fifo_size) {
|
||||
RK_SPI_WRITE_4(sc, RK_SPI_TXDR, sc->txbuf[sc->txidx++]);
|
||||
txlevel++;
|
||||
cnt++;
|
||||
}
|
||||
|
||||
if (sc->txidx != sc->txlen)
|
||||
|
Loading…
Reference in New Issue
Block a user