Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/usb Cosmetic cleanup.



details:   https://anonhg.NetBSD.org/src-all/rev/a3d170df0f57
branches:  trunk
changeset: 952606:a3d170df0f57
user:      Martin Husemann <martin%NetBSD.org@localhost>
date:      Mon Dec 14 15:25:56 2020 +0100

description:
Cosmetic cleanup.

Remove some accidently commited debug printfs, whitespace.
Improve a KASSERT my moving to KASSERTMSG.

diffstat:

 sys/dev/usb/if_urtwn.c |  11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diffs (64 lines):

diff -r 254076c2a5fa -r a3d170df0f57 sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Thu Dec 10 18:26:08 2020 +0100
+++ b/sys/dev/usb/if_urtwn.c    Mon Dec 14 15:25:56 2020 +0100
@@ -3014,7 +3014,6 @@
                                struct usbd_pipe *pipe = sc->tx_pipe[pidx];
                                usbd_clear_endpoint_stall_async(pipe);
                        }
-                       printf("ERROR1\n");
                        if_statinc(ifp, if_oerrors);
                }
                splx(s);
@@ -3022,9 +3021,8 @@
        }
 
        if_statinc(ifp, if_opackets);
-       urtwn_start(sc); 
+       urtwn_start(sc);
        splx(s);
-
 }
 
 static int
@@ -3306,7 +3304,7 @@
                        break;
 
                ni = M_GETCTX(m, struct ieee80211_node *);
-               KASSERT(ni != NULL);
+               KASSERTMSG(ni != NULL, "wifi mbuf w/o node: %p", m);
                M_CLEARCTX(m);
                vap = ni->ni_vap;
 
@@ -3337,7 +3335,6 @@
 
                if (m->m_len < (int)sizeof(*eh) &&
                    (m = m_pullup(m, sizeof(*eh))) == NULL) {
-                       printf("ERROR6\n");
                        if_statinc(vap->iv_ifp, if_oerrors);
                        urtwn_put_tx_data(sc, data);
                        continue;
@@ -3366,7 +3363,6 @@
                if (urtwn_tx(sc, m, ni, data) != 0) {
                        m_freem(m);
                        ieee80211_free_node(ni);
-                       printf("ERROR3\n");
                        if (vap != NULL)
                                if_statinc(vap->iv_ifp, if_oerrors);
                        continue;
@@ -3609,8 +3605,6 @@
 {
        struct urtwn_softc *sc = ic->ic_softc;
        int s;
-       // size_t pktlen = m->m_pkthdr.len;
-       // bool mcast = (m->m_flags & M_MCAST) != 0;
 
        DPRINTFN(DBG_FN, ("%s: %s\n",device_xname(sc->sc_dev), __func__));
 
@@ -3677,7 +3671,6 @@
 
        error = urtwn_tx(sc, m, ni, data);
        if (error != 0) {
-               printf("ERROR3\n");
                if_statinc(vap->iv_ifp, if_oerrors);
        } else {
                sc->tx_timer = 5;



Home | Main Index | Thread Index | Old Index