Module Name: src Committed By: christos Date: Sun Oct 2 14:16:03 UTC 2016
Modified Files: src/sys/dev: kttcp.c src/sys/dev/ic: elink3.c hme.c lance.c mtd803.c rrunner.c src/sys/dev/isa: if_iy.c src/sys/dev/ofw: ofnet.c src/sys/dev/pci/cxgb: cxgb_mvec.h src/sys/dev/pcmcia: if_cnw.c if_xi.c src/sys/dev/sbus: be.c qe.c src/sys/dev/scsipi: if_se.c Log Message: MFREE -> m_free To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/kttcp.c cvs rdiff -u -r1.138 -r1.139 src/sys/dev/ic/elink3.c cvs rdiff -u -r1.93 -r1.94 src/sys/dev/ic/hme.c cvs rdiff -u -r1.50 -r1.51 src/sys/dev/ic/lance.c cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/mtd803.c cvs rdiff -u -r1.81 -r1.82 src/sys/dev/ic/rrunner.c cvs rdiff -u -r1.97 -r1.98 src/sys/dev/isa/if_iy.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ofw/ofnet.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/pci/cxgb/cxgb_mvec.h cvs rdiff -u -r1.58 -r1.59 src/sys/dev/pcmcia/if_cnw.c cvs rdiff -u -r1.77 -r1.78 src/sys/dev/pcmcia/if_xi.c cvs rdiff -u -r1.83 -r1.84 src/sys/dev/sbus/be.c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/sbus/qe.c cvs rdiff -u -r1.91 -r1.92 src/sys/dev/scsipi/if_se.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/kttcp.c diff -u src/sys/dev/kttcp.c:1.39 src/sys/dev/kttcp.c:1.40 --- src/sys/dev/kttcp.c:1.39 Fri Jun 10 09:27:13 2016 +++ src/sys/dev/kttcp.c Sun Oct 2 10:16:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: kttcp.c,v 1.39 2016/06/10 13:27:13 ozaki-r Exp $ */ +/* $NetBSD: kttcp.c,v 1.40 2016/10/02 14:16:02 christos Exp $ */ /* * Copyright (c) 2002 Wasabi Systems, Inc. @@ -42,7 +42,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: kttcp.c,v 1.39 2016/06/10 13:27:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kttcp.c,v 1.40 2016/10/02 14:16:02 christos Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -474,8 +474,7 @@ kttcp_soreceive(struct socket *so, unsig m = m->m_next; } else { sbfree(&so->so_rcv, m); - MFREE(m, so->so_rcv.sb_mb); - m = so->so_rcv.sb_mb; + m = so->so_rcv.sb_mb = m_free(m); } } while (m && m->m_type == MT_CONTROL && error == 0) { @@ -483,8 +482,7 @@ kttcp_soreceive(struct socket *so, unsig m = m->m_next; } else { sbfree(&so->so_rcv, m); - MFREE(m, so->so_rcv.sb_mb); - m = so->so_rcv.sb_mb; + m = so->so_rcv.sb_mb = m_free(m); } } @@ -562,8 +560,7 @@ kttcp_soreceive(struct socket *so, unsig so->so_rcv.sb_mb = m = m->m_next; *mp = NULL; } else { - MFREE(m, so->so_rcv.sb_mb); - m = so->so_rcv.sb_mb; + m = so->so_rcv.sb_mb = m_free(m); } /* * If m != NULL, we also know that Index: src/sys/dev/ic/elink3.c diff -u src/sys/dev/ic/elink3.c:1.138 src/sys/dev/ic/elink3.c:1.139 --- src/sys/dev/ic/elink3.c:1.138 Fri Jun 10 09:27:13 2016 +++ src/sys/dev/ic/elink3.c Sun Oct 2 10:16:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: elink3.c,v 1.138 2016/06/10 13:27:13 ozaki-r Exp $ */ +/* $NetBSD: elink3.c,v 1.139 2016/10/02 14:16:02 christos Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: elink3.c,v 1.138 2016/06/10 13:27:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: elink3.c,v 1.139 2016/10/02 14:16:02 christos Exp $"); #include "opt_inet.h" @@ -1202,8 +1202,7 @@ startagain: bus_space_write_multi_1(iot, ioh, txreg, mtod(m, u_int8_t *), m->m_len); } - MFREE(m, m0); - m = m0; + m = m0 = m_free(m); } } else { for (m = m0; m;) { @@ -1223,8 +1222,7 @@ startagain: bus_space_write_1(iot, ioh, txreg, *(mtod(m, u_int8_t *) + m->m_len - 1)); } - MFREE(m, m0); - m = m0; + m = m0 = m_free(m); } } while (pad--) Index: src/sys/dev/ic/hme.c diff -u src/sys/dev/ic/hme.c:1.93 src/sys/dev/ic/hme.c:1.94 --- src/sys/dev/ic/hme.c:1.93 Fri Jun 10 09:27:13 2016 +++ src/sys/dev/ic/hme.c Sun Oct 2 10:16:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: hme.c,v 1.93 2016/06/10 13:27:13 ozaki-r Exp $ */ +/* $NetBSD: hme.c,v 1.94 2016/10/02 14:16:02 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.93 2016/06/10 13:27:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hme.c,v 1.94 2016/10/02 14:16:02 christos Exp $"); /* #define HMEDEBUG */ @@ -665,13 +665,13 @@ hme_put(struct hme_softc *sc, int ri, st for (; m; m = n) { len = m->m_len; if (len == 0) { - MFREE(m, n); + n = m_free(m); continue; } memcpy(bp, mtod(m, void *), len); bp += len; tlen += len; - MFREE(m, n); + n = m_free(m); } return (tlen); } Index: src/sys/dev/ic/lance.c diff -u src/sys/dev/ic/lance.c:1.50 src/sys/dev/ic/lance.c:1.51 --- src/sys/dev/ic/lance.c:1.50 Fri Jun 10 09:27:13 2016 +++ src/sys/dev/ic/lance.c Sun Oct 2 10:16:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: lance.c,v 1.50 2016/06/10 13:27:13 ozaki-r Exp $ */ +/* $NetBSD: lance.c,v 1.51 2016/10/02 14:16:02 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.50 2016/06/10 13:27:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lance.c,v 1.51 2016/10/02 14:16:02 christos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -343,13 +343,13 @@ lance_put(struct lance_softc *sc, int bo for (; m; m = n) { len = m->m_len; if (len == 0) { - MFREE(m, n); + n = m_free(m); continue; } (*sc->sc_copytobuf)(sc, mtod(m, void *), boff, len); boff += len; tlen += len; - MFREE(m, n); + n = m_free(m); } if (tlen < LEMINSIZE) { (*sc->sc_zerobuf)(sc, boff, LEMINSIZE - tlen); Index: src/sys/dev/ic/mtd803.c diff -u src/sys/dev/ic/mtd803.c:1.31 src/sys/dev/ic/mtd803.c:1.32 --- src/sys/dev/ic/mtd803.c:1.31 Fri Jun 10 09:27:13 2016 +++ src/sys/dev/ic/mtd803.c Sun Oct 2 10:16:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mtd803.c,v 1.31 2016/06/10 13:27:13 ozaki-r Exp $ */ +/* $NetBSD: mtd803.c,v 1.32 2016/10/02 14:16:02 christos Exp $ */ /*- * @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mtd803.c,v 1.31 2016/06/10 13:27:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mtd803.c,v 1.32 2016/10/02 14:16:02 christos Exp $"); #include <sys/param.h> @@ -432,19 +432,19 @@ mtd_put(struct mtd_softc *sc, int index, for (tlen = 0; m != NULL; m = n) { len = m->m_len; if (len == 0) { - MFREE(m, n); + n = m_free(m); continue; } else if (tlen > MTD_TXBUF_SIZE) { /* XXX FIXME: No idea what to do here. */ aprint_error_dev(sc->dev, "packet too large! Size = %i\n", tlen); - MFREE(m, n); + n = m_free(m); continue; } memcpy(buf, mtod(m, void *), len); buf += len; tlen += len; - MFREE(m, n); + n = m_free(m); } sc->desc[MTD_NUM_RXD + index].conf = MTD_TXD_CONF_PAD | MTD_TXD_CONF_CRC | MTD_TXD_CONF_IRQC Index: src/sys/dev/ic/rrunner.c diff -u src/sys/dev/ic/rrunner.c:1.81 src/sys/dev/ic/rrunner.c:1.82 --- src/sys/dev/ic/rrunner.c:1.81 Fri Jun 10 09:27:13 2016 +++ src/sys/dev/ic/rrunner.c Sun Oct 2 10:16:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: rrunner.c,v 1.81 2016/06/10 13:27:13 ozaki-r Exp $ */ +/* $NetBSD: rrunner.c,v 1.82 2016/10/02 14:16:02 christos Exp $ */ /* * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.81 2016/06/10 13:27:13 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rrunner.c,v 1.82 2016/10/02 14:16:02 christos Exp $"); #include "opt_inet.h" @@ -2222,7 +2222,7 @@ esh_adjust_mbufs(struct esh_softc *sc, s for (n0 = n = m; n; n = n->m_next) { while (n && n->m_len == 0) { - MFREE(n, m0); + m0 = m_free(n); if (n == m) n = n0 = m = m0; else @@ -2243,7 +2243,7 @@ esh_adjust_mbufs(struct esh_softc *sc, s MCLGET(o, M_DONTWAIT); if (!(o->m_flags & M_EXT)) { - MFREE(o, m0); + m0 = m_free(o); goto bogosity; } Index: src/sys/dev/isa/if_iy.c diff -u src/sys/dev/isa/if_iy.c:1.97 src/sys/dev/isa/if_iy.c:1.98 --- src/sys/dev/isa/if_iy.c:1.97 Thu Jul 14 06:19:06 2016 +++ src/sys/dev/isa/if_iy.c Sun Oct 2 10:16:02 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iy.c,v 1.97 2016/07/14 10:19:06 msaitoh Exp $ */ +/* $NetBSD: if_iy.c,v 1.98 2016/10/02 14:16:02 christos Exp $ */ /* #define IYDEBUG */ /* #define IYMEMDEBUG */ @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.97 2016/07/14 10:19:06 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iy.c,v 1.98 2016/10/02 14:16:02 christos Exp $"); #include "opt_inet.h" @@ -774,7 +774,7 @@ iystart(struct ifnet *ifp) #endif } - MFREE(m, m0); + m0 = m_free(m); } if (residual) Index: src/sys/dev/ofw/ofnet.c diff -u src/sys/dev/ofw/ofnet.c:1.55 src/sys/dev/ofw/ofnet.c:1.56 --- src/sys/dev/ofw/ofnet.c:1.55 Fri Jun 10 09:27:14 2016 +++ src/sys/dev/ofw/ofnet.c Sun Oct 2 10:16:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ofnet.c,v 1.55 2016/06/10 13:27:14 ozaki-r Exp $ */ +/* $NetBSD: ofnet.c,v 1.56 2016/10/02 14:16:03 christos Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.55 2016/06/10 13:27:14 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofnet.c,v 1.56 2016/10/02 14:16:03 christos Exp $"); #include "ofnet.h" #include "opt_inet.h" @@ -335,7 +335,7 @@ ofnet_start(struct ifnet *ifp) for (bufp = buf; (m = m0) != NULL;) { memcpy(bufp, mtod(m, char *), m->m_len); bufp += m->m_len; - MFREE(m, m0); + m0 = m_free(m); } /* Index: src/sys/dev/pci/cxgb/cxgb_mvec.h diff -u src/sys/dev/pci/cxgb/cxgb_mvec.h:1.1 src/sys/dev/pci/cxgb/cxgb_mvec.h:1.2 --- src/sys/dev/pci/cxgb/cxgb_mvec.h:1.1 Sun Mar 21 17:11:13 2010 +++ src/sys/dev/pci/cxgb/cxgb_mvec.h Sun Oct 2 10:16:03 2016 @@ -124,10 +124,7 @@ m_collapse(struct mbuf *m, int maxbufs, static inline struct mbuf * m_free_vec(struct mbuf *m) { - struct mbuf *n = NULL; - - MFREE(m, n); - return (n); + return m_free(m); } static inline void Index: src/sys/dev/pcmcia/if_cnw.c diff -u src/sys/dev/pcmcia/if_cnw.c:1.58 src/sys/dev/pcmcia/if_cnw.c:1.59 --- src/sys/dev/pcmcia/if_cnw.c:1.58 Fri Jun 10 09:27:15 2016 +++ src/sys/dev/pcmcia/if_cnw.c Sun Oct 2 10:16:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cnw.c,v 1.58 2016/06/10 13:27:15 ozaki-r Exp $ */ +/* $NetBSD: if_cnw.c,v 1.59 2016/10/02 14:16:03 christos Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -105,7 +105,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_cnw.c,v 1.58 2016/06/10 13:27:15 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cnw.c,v 1.59 2016/10/02 14:16:03 christos Exp $"); #include "opt_inet.h" @@ -728,8 +728,7 @@ cnw_transmit(struct cnw_softc *sc, struc mptr += n; mbytes -= n; } - MFREE(m, m0); - m = m0; + m = m0 = m_free(m); } /* Issue transmit command */ Index: src/sys/dev/pcmcia/if_xi.c diff -u src/sys/dev/pcmcia/if_xi.c:1.77 src/sys/dev/pcmcia/if_xi.c:1.78 --- src/sys/dev/pcmcia/if_xi.c:1.77 Fri Jun 10 09:27:15 2016 +++ src/sys/dev/pcmcia/if_xi.c Sun Oct 2 10:16:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_xi.c,v 1.77 2016/06/10 13:27:15 ozaki-r Exp $ */ +/* $NetBSD: if_xi.c,v 1.78 2016/10/02 14:16:03 christos Exp $ */ /* OpenBSD: if_xe.c,v 1.9 1999/09/16 11:28:42 niklas Exp */ /* @@ -55,7 +55,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_xi.c,v 1.77 2016/06/10 13:27:15 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_xi.c,v 1.78 2016/10/02 14:16:03 christos Exp $"); #include "opt_inet.h" @@ -811,8 +811,7 @@ xi_start(struct ifnet *ifp) bus_space_write_1(bst, bsh, EDP, *(mtod(m, u_int8_t *) + m->m_len - 1)); } - MFREE(m, m0); - m = m0; + m = m0 = m_free(m); } DPRINTF(XID_CONFIG, ("xi: len=%d pad=%d total=%d\n", len, pad, len+pad+4)); if (sc->sc_chipset >= XI_CHIPSET_MOHAWK) Index: src/sys/dev/sbus/be.c diff -u src/sys/dev/sbus/be.c:1.83 src/sys/dev/sbus/be.c:1.84 --- src/sys/dev/sbus/be.c:1.83 Fri Jun 10 09:27:15 2016 +++ src/sys/dev/sbus/be.c Sun Oct 2 10:16:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: be.c,v 1.83 2016/06/10 13:27:15 ozaki-r Exp $ */ +/* $NetBSD: be.c,v 1.84 2016/10/02 14:16:03 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.83 2016/06/10 13:27:15 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: be.c,v 1.84 2016/10/02 14:16:03 christos Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -473,13 +473,13 @@ be_put(struct be_softc *sc, int idx, str for (; m; m = n) { len = m->m_len; if (len == 0) { - MFREE(m, n); + n = m_free(m); continue; } memcpy(bp + boff, mtod(m, void *), len); boff += len; tlen += len; - MFREE(m, n); + n = m_free(m); } return tlen; } Index: src/sys/dev/sbus/qe.c diff -u src/sys/dev/sbus/qe.c:1.65 src/sys/dev/sbus/qe.c:1.66 --- src/sys/dev/sbus/qe.c:1.65 Fri Jun 10 09:27:15 2016 +++ src/sys/dev/sbus/qe.c Sun Oct 2 10:16:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: qe.c,v 1.65 2016/06/10 13:27:15 ozaki-r Exp $ */ +/* $NetBSD: qe.c,v 1.66 2016/10/02 14:16:03 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.65 2016/06/10 13:27:15 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: qe.c,v 1.66 2016/10/02 14:16:03 christos Exp $"); #define QEDEBUG @@ -383,13 +383,13 @@ qe_put(struct qe_softc *sc, int idx, str for (; m; m = n) { len = m->m_len; if (len == 0) { - MFREE(m, n); + n = m_free(m); continue; } memcpy(bp + boff, mtod(m, void *), len); boff += len; tlen += len; - MFREE(m, n); + n = m_free(m); } return (tlen); } Index: src/sys/dev/scsipi/if_se.c diff -u src/sys/dev/scsipi/if_se.c:1.91 src/sys/dev/scsipi/if_se.c:1.92 --- src/sys/dev/scsipi/if_se.c:1.91 Wed Sep 7 10:21:01 2016 +++ src/sys/dev/scsipi/if_se.c Sun Oct 2 10:16:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_se.c,v 1.91 2016/09/07 14:21:01 jakllsch Exp $ */ +/* $NetBSD: if_se.c,v 1.92 2016/10/02 14:16:03 christos Exp $ */ /* * Copyright (c) 1997 Ian W. Dall <ian.d...@dsto.defence.gov.au> @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.91 2016/09/07 14:21:01 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_se.c,v 1.92 2016/10/02 14:16:03 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -448,8 +448,7 @@ se_ifstart(struct ifnet *ifp) for (m = m0; m != NULL; ) { memcpy(cp, mtod(m, u_char *), m->m_len); cp += m->m_len; - MFREE(m, m0); - m = m0; + m = m0 = m_free(m); } if (len < SEMINSIZE) { #ifdef SEDEBUG