Fix unused variable warning in if_alc.c

With clang 15, the following -Werror warning is produced:

    sys/dev/alc/if_alc.c:3441:6: error: variable 'prog' set but not used [-Werror,-Wunused-but-set-variable]
            int prog;
                ^

The 'prog' variable seems to be a left-over from some debugging code
that no longer exists, and can be removed without any functional change.

MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D35831
This commit is contained in:
Dimitry Andric 2022-07-16 17:06:31 +02:00
parent 9a97978883
commit 64741244fc

View File

@ -3438,7 +3438,6 @@ alc_txeof(struct alc_softc *sc)
struct ifnet *ifp; struct ifnet *ifp;
struct alc_txdesc *txd; struct alc_txdesc *txd;
uint32_t cons, prod; uint32_t cons, prod;
int prog;
ALC_LOCK_ASSERT(sc); ALC_LOCK_ASSERT(sc);
@ -3467,11 +3466,9 @@ alc_txeof(struct alc_softc *sc)
* Go through our Tx list and free mbufs for those * Go through our Tx list and free mbufs for those
* frames which have been transmitted. * frames which have been transmitted.
*/ */
for (prog = 0; cons != prod; prog++, for (; cons != prod; ALC_DESC_INC(cons, ALC_TX_RING_CNT)) {
ALC_DESC_INC(cons, ALC_TX_RING_CNT)) {
if (sc->alc_cdata.alc_tx_cnt <= 0) if (sc->alc_cdata.alc_tx_cnt <= 0)
break; break;
prog++;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
sc->alc_cdata.alc_tx_cnt--; sc->alc_cdata.alc_tx_cnt--;
txd = &sc->alc_cdata.alc_txdesc[cons]; txd = &sc->alc_cdata.alc_txdesc[cons];