git: 0fe8ab685168 - main - Fix unused variable warning in rockchip's rk_spi.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Aug 2022 19:27:49 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0fe8ab6851687dc7249e3c5b5df3d6723d1c3e7a commit 0fe8ab6851687dc7249e3c5b5df3d6723d1c3e7a Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-08-14 18:36:13 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-08-14 19:27:34 +0000 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 --- sys/arm64/rockchip/rk_spi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/arm64/rockchip/rk_spi.c b/sys/arm64/rockchip/rk_spi.c index d6ed51278dd7..fcdc3b181967 100644 --- a/sys/arm64/rockchip/rk_spi.c +++ b/sys/arm64/rockchip/rk_spi.c @@ -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)