Date: Sun, 21 Aug 2022 11:28:58 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 4922e544ee86 - stable/13 - Fix unused variable warning in rockchip's rk_spi.c Message-ID: <202208211128.27LBSwjk004180@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=4922e544ee8659252a04fbab1e002361cfd300b4 commit 4922e544ee8659252a04fbab1e002361cfd300b4 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-08-14 18:36:13 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-08-21 11:10:50 +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 (cherry picked from commit 0fe8ab6851687dc7249e3c5b5df3d6723d1c3e7a) --- 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 4df1208f40aa..a5f0d93263d8 100644 --- a/sys/arm64/rockchip/rk_spi.c +++ b/sys/arm64/rockchip/rk_spi.c @@ -225,12 +225,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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208211128.27LBSwjk004180>