sfxge: Use __diagused for variables only used in KASSERT().

This commit is contained in:
John Baldwin 2022-04-13 16:08:20 -07:00
parent 03d49ffc78
commit e565fa55e6
4 changed files with 13 additions and 12 deletions

View File

@ -814,7 +814,7 @@ sfxge_ev_qstart(struct sfxge_softc *sc, unsigned int index)
void
sfxge_ev_stop(struct sfxge_softc *sc)
{
struct sfxge_intr *intr;
struct sfxge_intr *intr __diagused;
efx_nic_t *enp;
int index;
@ -836,7 +836,7 @@ sfxge_ev_stop(struct sfxge_softc *sc)
int
sfxge_ev_start(struct sfxge_softc *sc)
{
struct sfxge_intr *intr;
struct sfxge_intr *intr __diagused;
int index;
int rc;
@ -957,7 +957,7 @@ sfxge_ev_qinit(struct sfxge_softc *sc, unsigned int index)
void
sfxge_ev_fini(struct sfxge_softc *sc)
{
struct sfxge_intr *intr;
struct sfxge_intr *intr __diagused;
int index;
intr = &sc->intr;

View File

@ -76,7 +76,7 @@ sfxge_mcdi_poll(struct sfxge_softc *sc, uint32_t timeout_us)
efx_nic_t *enp;
clock_t delay_total;
clock_t delay_us;
boolean_t aborted;
boolean_t aborted __diagused;
delay_total = 0;
delay_us = SFXGE_MCDI_POLL_INTERVAL_MIN;
@ -140,7 +140,7 @@ static void
sfxge_mcdi_ev_cpl(void *arg)
{
struct sfxge_softc *sc;
struct sfxge_mcdi *mcdi;
struct sfxge_mcdi *mcdi __diagused;
sc = (struct sfxge_softc *)arg;
mcdi = &sc->mcdi;

View File

@ -223,7 +223,7 @@ sfxge_rx_qfill(struct sfxge_rxq *rxq, unsigned int target, boolean_t retrying)
{
struct sfxge_softc *sc;
unsigned int index;
struct sfxge_evq *evq;
struct sfxge_evq *evq __diagused;
unsigned int batch;
unsigned int rxfill;
unsigned int mblksize;
@ -815,7 +815,7 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq, boolean_t eop)
int if_capenable = sc->ifnet->if_capenable;
int lro_enabled = if_capenable & IFCAP_LRO;
unsigned int index;
struct sfxge_evq *evq;
struct sfxge_evq *evq __diagused;
unsigned int completed;
unsigned int level;
struct mbuf *m;
@ -844,7 +844,8 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq, boolean_t eop)
/* Read the length from the pseudo header if required */
if (rx_desc->flags & EFX_PKT_PREFIX_LEN) {
uint16_t tmp_size;
int rc;
int rc __diagused;
rc = efx_pseudo_hdr_pkt_length_get(rxq->common,
mtod(m, uint8_t *),
&tmp_size);

View File

@ -331,10 +331,10 @@ sfxge_tx_qreap(struct sfxge_txq *txq)
static void
sfxge_tx_qlist_post(struct sfxge_txq *txq)
{
unsigned int old_added;
unsigned int old_added __diagused;
unsigned int block_level;
unsigned int level;
int rc;
int rc __diagused;
SFXGE_TXQ_LOCK_ASSERT_OWNED(txq);
@ -1433,7 +1433,7 @@ static void
sfxge_tx_qunblock(struct sfxge_txq *txq)
{
struct sfxge_softc *sc;
struct sfxge_evq *evq;
struct sfxge_evq *evq __diagused;
sc = txq->sc;
evq = sc->evq[txq->evq_index];
@ -2001,7 +2001,7 @@ int
sfxge_tx_init(struct sfxge_softc *sc)
{
const efx_nic_cfg_t *encp = efx_nic_cfg_get(sc->enp);
struct sfxge_intr *intr;
struct sfxge_intr *intr __diagused;
int index;
int rc;