git: e565fa55e687 - main - sfxge: Use __diagused for variables only used in KASSERT().
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Apr 2022 23:09:24 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=e565fa55e68757b9abe42cf42e8bf20916546c94
commit e565fa55e68757b9abe42cf42e8bf20916546c94
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-13 23:08:20 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-13 23:08:20 +0000
sfxge: Use __diagused for variables only used in KASSERT().
---
sys/dev/sfxge/sfxge_ev.c | 6 +++---
sys/dev/sfxge/sfxge_mcdi.c | 4 ++--
sys/dev/sfxge/sfxge_rx.c | 7 ++++---
sys/dev/sfxge/sfxge_tx.c | 8 ++++----
4 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/sys/dev/sfxge/sfxge_ev.c b/sys/dev/sfxge/sfxge_ev.c
index 70e44a1e9723..da04cb3ce061 100644
--- a/sys/dev/sfxge/sfxge_ev.c
+++ b/sys/dev/sfxge/sfxge_ev.c
@@ -814,7 +814,7 @@ fail:
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 @@ fail_evq_stat_init:
void
sfxge_ev_fini(struct sfxge_softc *sc)
{
- struct sfxge_intr *intr;
+ struct sfxge_intr *intr __diagused;
int index;
intr = &sc->intr;
diff --git a/sys/dev/sfxge/sfxge_mcdi.c b/sys/dev/sfxge/sfxge_mcdi.c
index 00aaa73027a8..8107cdd42aaf 100644
--- a/sys/dev/sfxge/sfxge_mcdi.c
+++ b/sys/dev/sfxge/sfxge_mcdi.c
@@ -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;
diff --git a/sys/dev/sfxge/sfxge_rx.c b/sys/dev/sfxge/sfxge_rx.c
index 1f94b066dc78..1baab1ac17a6 100644
--- a/sys/dev/sfxge/sfxge_rx.c
+++ b/sys/dev/sfxge/sfxge_rx.c
@@ -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);
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c
index 8be74a81bd8b..f2af6da9fcaf 100644
--- a/sys/dev/sfxge/sfxge_tx.c
+++ b/sys/dev/sfxge/sfxge_tx.c
@@ -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;