Hi,

The use of MCLGETL with the default length MCLBYTES is useless.  Thus,
this diff removes '(void)' from the MCLGET macro as it is in the MCLGETL
and replaces all uses of MCLGETL with MCLBYTES by MCLGET.

OK?

bye,
Jan

Index: arch/octeon/dev/if_ogx.c
===================================================================
RCS file: /cvs/src/sys/arch/octeon/dev/if_ogx.c,v
retrieving revision 1.3
diff -u -p -r1.3 if_ogx.c
--- arch/octeon/dev/if_ogx.c    12 Dec 2020 11:48:52 -0000      1.3
+++ arch/octeon/dev/if_ogx.c    12 Dec 2020 12:58:31 -0000
@@ -1147,7 +1147,7 @@ ogx_load_mbufs(struct ogx_softc *sc, uns
        paddr_t pktbuf;
 
        for ( ; n > 0; n--) {
-               m = MCLGETL(NULL, M_NOWAIT, MCLBYTES);
+               m = MCLGET(NULL, M_NOWAIT);
                if (m == NULL)
                        break;
 
Index: dev/fdt/if_dwge.c
===================================================================
RCS file: /cvs/src/sys/dev/fdt/if_dwge.c,v
retrieving revision 1.7
diff -u -p -r1.7 if_dwge.c
--- dev/fdt/if_dwge.c   12 Dec 2020 11:48:52 -0000      1.7
+++ dev/fdt/if_dwge.c   12 Dec 2020 12:58:31 -0000
@@ -1283,7 +1283,7 @@ dwge_alloc_mbuf(struct dwge_softc *sc, b
 {
        struct mbuf *m = NULL;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (!m)
                return (NULL);
        m->m_len = m->m_pkthdr.len = MCLBYTES;
Index: dev/fdt/if_dwxe.c
===================================================================
RCS file: /cvs/src/sys/dev/fdt/if_dwxe.c,v
retrieving revision 1.18
diff -u -p -r1.18 if_dwxe.c
--- dev/fdt/if_dwxe.c   12 Dec 2020 11:48:52 -0000      1.18
+++ dev/fdt/if_dwxe.c   12 Dec 2020 12:58:31 -0000
@@ -1342,7 +1342,7 @@ dwxe_alloc_mbuf(struct dwxe_softc *sc, b
 {
        struct mbuf *m = NULL;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (!m)
                return (NULL);
        m->m_len = m->m_pkthdr.len = MCLBYTES;
Index: dev/fdt/if_fec.c
===================================================================
RCS file: /cvs/src/sys/dev/fdt/if_fec.c,v
retrieving revision 1.11
diff -u -p -r1.11 if_fec.c
--- dev/fdt/if_fec.c    12 Dec 2020 11:48:52 -0000      1.11
+++ dev/fdt/if_fec.c    12 Dec 2020 12:58:31 -0000
@@ -1298,7 +1298,7 @@ fec_alloc_mbuf(struct fec_softc *sc, bus
 {
        struct mbuf *m = NULL;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (!m)
                return (NULL);
        m->m_len = m->m_pkthdr.len = MCLBYTES;
Index: dev/fdt/if_mvneta.c
===================================================================
RCS file: /cvs/src/sys/dev/fdt/if_mvneta.c,v
retrieving revision 1.16
diff -u -p -r1.16 if_mvneta.c
--- dev/fdt/if_mvneta.c 12 Dec 2020 11:48:52 -0000      1.16
+++ dev/fdt/if_mvneta.c 12 Dec 2020 12:58:31 -0000
@@ -1654,7 +1654,7 @@ mvneta_alloc_mbuf(struct mvneta_softc *s
 {
        struct mbuf *m = NULL;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (!m)
                return (NULL);
        m->m_len = m->m_pkthdr.len = MCLBYTES;
Index: dev/fdt/if_mvpp.c
===================================================================
RCS file: /cvs/src/sys/dev/fdt/if_mvpp.c,v
retrieving revision 1.44
diff -u -p -r1.44 if_mvpp.c
--- dev/fdt/if_mvpp.c   12 Dec 2020 11:48:52 -0000      1.44
+++ dev/fdt/if_mvpp.c   12 Dec 2020 12:58:31 -0000
@@ -3124,7 +3124,7 @@ mvpp2_alloc_mbuf(struct mvpp2_softc *sc,
 {
        struct mbuf *m = NULL;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (!m)
                return (NULL);
        m->m_len = m->m_pkthdr.len = MCLBYTES;
Index: dev/ic/bcmgenet.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/bcmgenet.c,v
retrieving revision 1.4
diff -u -p -r1.4 bcmgenet.c
--- dev/ic/bcmgenet.c   12 Dec 2020 11:48:52 -0000      1.4
+++ dev/ic/bcmgenet.c   12 Dec 2020 12:58:31 -0000
@@ -300,7 +300,7 @@ genet_alloc_mbufcl(struct genet_softc *s
 {
        struct mbuf *m;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (m != NULL)
                m->m_pkthdr.len = m->m_len = m->m_ext.ext_size;
 
Index: dev/ic/elink3.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/elink3.c,v
retrieving revision 1.98
diff -u -p -r1.98 elink3.c
--- dev/ic/elink3.c     12 Dec 2020 11:48:52 -0000      1.98
+++ dev/ic/elink3.c     12 Dec 2020 12:58:31 -0000
@@ -1343,7 +1343,7 @@ epget(struct ep_softc *sc, int totlen)
        m = sc->mb[sc->next_mb];
        sc->mb[sc->next_mb] = NULL;
        if (m == NULL) {
-               m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+               m = MCLGET(NULL, M_DONTWAIT);
                /* If the queue is no longer full, refill. */
                if (!timeout_pending(&sc->sc_epmbuffill_tmo))
                        timeout_add(&sc->sc_epmbuffill_tmo, 1);
@@ -1609,7 +1609,7 @@ epmbuffill(void *v)
        s = splnet();
        for (i = 0; i < MAX_MBS; i++) {
                if (sc->mb[i] == NULL) {
-                       sc->mb[i] = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+                       sc->mb[i] = MCLGET(NULL, M_DONTWAIT);
                        if (sc->mb[i] == NULL)
                                break;
                }
Index: dev/ic/gem.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/gem.c,v
retrieving revision 1.126
diff -u -p -r1.126 gem.c
--- dev/ic/gem.c        12 Dec 2020 11:48:52 -0000      1.126
+++ dev/ic/gem.c        12 Dec 2020 12:58:31 -0000
@@ -1057,7 +1057,7 @@ gem_add_rxbuf(struct gem_softc *sc, int 
        struct mbuf *m;
        int error;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (!m)
                return (ENOBUFS);
        m->m_len = m->m_pkthdr.len = MCLBYTES;
Index: dev/ic/hme.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/hme.c,v
retrieving revision 1.83
diff -u -p -r1.83 hme.c
--- dev/ic/hme.c        12 Dec 2020 11:48:52 -0000      1.83
+++ dev/ic/hme.c        12 Dec 2020 12:58:31 -0000
@@ -1284,7 +1284,7 @@ hme_newbuf(struct hme_softc *sc, struct 
         * until we're sure everything is a success.
         */
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (!m)
                return (ENOBUFS);
 
Index: dev/ic/rt2860.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/rt2860.c,v
retrieving revision 1.101
diff -u -p -r1.101 rt2860.c
--- dev/ic/rt2860.c     12 Dec 2020 11:48:52 -0000      1.101
+++ dev/ic/rt2860.c     12 Dec 2020 12:58:31 -0000
@@ -685,7 +685,7 @@ rt2860_alloc_rx_ring(struct rt2860_softc
                        goto fail;
                }
 
-               data->m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+               data->m = MCLGET(NULL, M_DONTWAIT);
                if (data->m == NULL) {
                        printf("%s: could not allocate Rx mbuf\n",
                            sc->sc_dev.dv_xname);
@@ -1304,7 +1304,7 @@ rt2860_rx_intr(struct rt2860_softc *sc)
                        goto skip;
                }
 
-               m1 = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+               m1 = MCLGET(NULL, M_DONTWAIT);
                if (__predict_false(m1 == NULL)) {
                        ifp->if_ierrors++;
                        goto skip;
Index: dev/ic/ti.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ti.c,v
retrieving revision 1.28
diff -u -p -r1.28 ti.c
--- dev/ic/ti.c 12 Dec 2020 11:48:52 -0000      1.28
+++ dev/ic/ti.c 12 Dec 2020 12:58:31 -0000
@@ -576,7 +576,7 @@ ti_newbuf_std(struct ti_softc *sc, int i
        sc->ti_cdata.ti_rx_std_map[i] = dmamap;
 
        if (m == NULL) {
-               m_new = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+               m_new = MCLGET(NULL, M_DONTWAIT);
                if (m_new == NULL)
                        return (ENOBUFS);
 
Index: dev/ic/xl.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/xl.c,v
retrieving revision 1.136
diff -u -p -r1.136 xl.c
--- dev/ic/xl.c 12 Dec 2020 11:48:52 -0000      1.136
+++ dev/ic/xl.c 12 Dec 2020 12:58:31 -0000
@@ -1081,7 +1081,7 @@ xl_newbuf(struct xl_softc *sc, struct xl
        struct mbuf     *m_new = NULL;
        bus_dmamap_t    map;
 
-       m_new = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m_new = MCLGET(NULL, M_DONTWAIT);
        if (!m_new)
                return (ENOBUFS);
 
Index: dev/pci/if_nfe.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_nfe.c,v
retrieving revision 1.123
diff -u -p -r1.123 if_nfe.c
--- dev/pci/if_nfe.c    12 Dec 2020 11:48:53 -0000      1.123
+++ dev/pci/if_nfe.c    12 Dec 2020 12:58:31 -0000
@@ -697,7 +697,7 @@ nfe_rxeof(struct nfe_softc *sc)
                 * old mbuf. In the unlikely case that the old mbuf can't be
                 * reloaded either, explicitly panic.
                 */
-               mnew = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+               mnew = MCLGET(NULL, M_DONTWAIT);
                if (mnew == NULL) {
                        ifp->if_ierrors++;
                        goto skip;
@@ -1210,7 +1210,7 @@ nfe_alloc_rx_ring(struct nfe_softc *sc, 
        for (i = 0; i < NFE_RX_RING_COUNT; i++) {
                data = &sc->rxq.data[i];
 
-               data->m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+               data->m = MCLGET(NULL, M_DONTWAIT);
                if (data->m == NULL) {
                        printf("%s: could not allocate rx mbuf\n",
                            sc->sc_dev.dv_xname);
Index: dev/pci/if_oce.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_oce.c,v
retrieving revision 1.104
diff -u -p -r1.104 if_oce.c
--- dev/pci/if_oce.c    12 Dec 2020 11:48:53 -0000      1.104
+++ dev/pci/if_oce.c    12 Dec 2020 12:58:31 -0000
@@ -1761,7 +1761,7 @@ oce_get_buf(struct oce_rq *rq)
        if ((pkt = oce_pkt_get(&rq->pkt_free)) == NULL)
                return (0);
 
-       pkt->mbuf = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       pkt->mbuf = MCLGET(NULL, M_DONTWAIT);
        if (pkt->mbuf == NULL) {
                oce_pkt_put(&rq->pkt_free, pkt);
                return (0);
Index: dev/pci/if_rtwn.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_rtwn.c,v
retrieving revision 1.37
diff -u -p -r1.37 if_rtwn.c
--- dev/pci/if_rtwn.c   12 Dec 2020 11:48:53 -0000      1.37
+++ dev/pci/if_rtwn.c   12 Dec 2020 12:58:31 -0000
@@ -545,7 +545,7 @@ rtwn_alloc_rx_list(struct rtwn_pci_softc
                        goto fail;
                }
 
-               rx_data->m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+               rx_data->m = MCLGET(NULL, M_DONTWAIT);
                if (rx_data->m == NULL) {
                        printf("%s: could not allocate rx mbuf\n",
                            sc->sc_dev.dv_xname);
@@ -887,7 +887,7 @@ rtwn_rx_frame(struct rtwn_pci_softc *sc,
        DPRINTFN(5, ("Rx frame len=%d rate=%d infosz=%d shift=%d rssi=%d\n",
            pktlen, rate, infosz, shift, rssi));
 
-       m1 = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m1 = MCLGET(NULL, M_DONTWAIT);
        if (m1 == NULL) {
                ifp->if_ierrors++;
                return;
Index: dev/pci/if_se.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_se.c,v
retrieving revision 1.22
diff -u -p -r1.22 if_se.c
--- dev/pci/if_se.c     12 Dec 2020 11:48:53 -0000      1.22
+++ dev/pci/if_se.c     12 Dec 2020 12:58:31 -0000
@@ -847,7 +847,7 @@ se_newbuf(struct se_softc *sc, uint i)
        struct mbuf *m;
        int rc;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (m == NULL) {
 #ifdef SE_DEBUG
                if (ifp->if_flags & IFF_DEBUG)
Index: dev/pci/if_sis.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_sis.c,v
retrieving revision 1.139
diff -u -p -r1.139 if_sis.c
--- dev/pci/if_sis.c    12 Dec 2020 11:48:53 -0000      1.139
+++ dev/pci/if_sis.c    12 Dec 2020 12:58:31 -0000
@@ -1323,7 +1323,7 @@ sis_newbuf(struct sis_softc *sc, struct 
        if (c == NULL)
                return (EINVAL);
 
-       m_new = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m_new = MCLGET(NULL, M_DONTWAIT);
        if (!m_new)
                return (ENOBUFS);
 
Index: dev/pci/if_vr.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_vr.c,v
retrieving revision 1.157
diff -u -p -r1.157 if_vr.c
--- dev/pci/if_vr.c     12 Dec 2020 11:48:53 -0000      1.157
+++ dev/pci/if_vr.c     12 Dec 2020 12:58:31 -0000
@@ -1699,7 +1699,7 @@ vr_alloc_mbuf(struct vr_softc *sc, struc
        if (r == NULL)
                return (EINVAL);
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (!m)
                return (ENOBUFS);
 
Index: dev/pv/if_vio.c
===================================================================
RCS file: /cvs/src/sys/dev/pv/if_vio.c,v
retrieving revision 1.19
diff -u -p -r1.19 if_vio.c
--- dev/pv/if_vio.c     12 Dec 2020 11:48:53 -0000      1.19
+++ dev/pv/if_vio.c     12 Dec 2020 12:58:31 -0000
@@ -904,7 +904,7 @@ vio_add_rx_mbuf(struct vio_softc *sc, in
        struct mbuf *m;
        int r;
 
-       m = MCLGETL(NULL, M_DONTWAIT, MCLBYTES);
+       m = MCLGET(NULL, M_DONTWAIT);
        if (m == NULL)
                return ENOBUFS;
        sc->sc_rx_mbufs[i] = m;
Index: kern/uipc_socket.c
===================================================================
RCS file: /cvs/src/sys/kern/uipc_socket.c,v
retrieving revision 1.251
diff -u -p -r1.251 uipc_socket.c
--- kern/uipc_socket.c  12 Dec 2020 11:48:54 -0000      1.251
+++ kern/uipc_socket.c  12 Dec 2020 12:58:31 -0000
@@ -599,7 +599,7 @@ m_getuio(struct mbuf **mp, int atomic, l
                if (resid >= MINCLSIZE) {
                        MCLGETL(m, M_NOWAIT, ulmin(resid, MAXMCLBYTES));
                        if ((m->m_flags & M_EXT) == 0)
-                               MCLGETL(m, M_NOWAIT, MCLBYTES);
+                               MCLGET(m, M_NOWAIT);
                        if ((m->m_flags & M_EXT) == 0)
                                goto nopages;
                        mlen = m->m_ext.ext_size;
Index: sys/mbuf.h
===================================================================
RCS file: /cvs/src/sys/sys/mbuf.h,v
retrieving revision 1.251
diff -u -p -r1.251 mbuf.h
--- sys/mbuf.h  12 Dec 2020 11:49:02 -0000      1.251
+++ sys/mbuf.h  12 Dec 2020 12:58:31 -0000
@@ -311,7 +311,7 @@ struct mbuf {
        MCLINITREFERENCE(m);                                            \
 } while (/* CONSTCOND */ 0)
 
-#define MCLGET(m, how) (void) m_clget((m), (how), MCLBYTES)
+#define MCLGET(m, how) m_clget((m), (how), MCLBYTES)
 #define MCLGETL(m, how, l) m_clget((m), (how), (l))
 
 u_int mextfree_register(void (*)(caddr_t, u_int, void *));

Reply via email to