The branch main has been updated by mjg:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=f7daf710382afae9ba5824a89ef522800759c3f2

commit f7daf710382afae9ba5824a89ef522800759c3f2
Author:     Mateusz Guzik <m...@freebsd.org>
AuthorDate: 2022-04-22 22:16:25 +0000
Commit:     Mateusz Guzik <m...@freebsd.org>
CommitDate: 2022-04-22 22:16:25 +0000

    iwm: plug set-but-not-used vars
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/dev/iwm/if_iwm.c            | 11 ++++++++++-
 sys/dev/iwm/if_iwm_time_event.c |  2 ++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
index 439a68da9253..257441531a37 100644
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -3056,7 +3056,12 @@ static int
 iwm_get_noise(struct iwm_softc *sc,
     const struct iwm_statistics_rx_non_phy *stats)
 {
-       int i, total, nbant, noise;
+       int i, noise;
+#ifdef IWM_DEBUG
+       int nbant, total;
+#else
+       int nbant __unused, total __unused;
+#endif
 
        total = nbant = noise = 0;
        for (i = 0; i < 3; i++) {
@@ -5487,12 +5492,14 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
                        break;
 
                case IWM_SCAN_ITERATION_COMPLETE_UMAC: {
+#ifdef IWM_DEBUG
                        struct iwm_umac_scan_iter_complete_notif *notif;
                        notif = (void *)pkt->data;
 
                        IWM_DPRINTF(sc, IWM_DEBUG_SCAN, "UMAC scan iteration "
                            "complete, status=0x%x, %d channels scanned\n",
                            notif->status, notif->scanned_channels);
+#endif
                        break;
                }
 
@@ -5522,6 +5529,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
                        break;
 
                case IWM_SCD_QUEUE_CFG: {
+#ifdef IWM_DEBUG
                        struct iwm_scd_txq_cfg_rsp *rsp;
                        rsp = (void *)pkt->data;
 
@@ -5530,6 +5538,7 @@ iwm_handle_rxb(struct iwm_softc *sc, struct mbuf *m)
                            "tid=%d scd_queue=%d\n",
                            rsp->token, rsp->sta_id, rsp->tid,
                            rsp->scd_queue);
+#endif
                        break;
                }
 
diff --git a/sys/dev/iwm/if_iwm_time_event.c b/sys/dev/iwm/if_iwm_time_event.c
index 03aefb11b021..57c7e389a6be 100644
--- a/sys/dev/iwm/if_iwm_time_event.c
+++ b/sys/dev/iwm/if_iwm_time_event.c
@@ -187,6 +187,7 @@ iwm_te_handle_notif(struct iwm_softc *sc,
            le32toh(notif->action));
 
        if (!le32toh(notif->status)) {
+#ifdef IWM_DEBUG
                const char *msg;
 
                if (notif->action & htole32(IWM_TE_V2_NOTIF_HOST_EVENT_START))
@@ -195,6 +196,7 @@ iwm_te_handle_notif(struct iwm_softc *sc,
                        msg = "Time Event end notification failure";
 
                IWM_DPRINTF(sc, IWM_DEBUG_TE, "%s\n", msg);
+#endif
        }
 
        if (le32toh(notif->action) & IWM_TE_V2_NOTIF_HOST_EVENT_END) {

Reply via email to