diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2013-08-21 05:21:47 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2013-08-21 05:21:47 +0000 |
commit | 6c6287fe271247607d595cdf2777af3e65547680 (patch) | |
tree | a8c0feda16a4dbe1b9ec8258e9a50ceaccf30e16 /sys/dev/pci | |
parent | a83165bd346e9097817cfc2dbbdf05990cc2fa80 (diff) |
get rid of the copy argument in m_devget that let you provide an
alternative to bcopy since noone uses it.
while there use memcpy instead of bcopy because we know the memory cannot
overlap.
ok henning@ matthew@ mikeb@ deraadt@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_ale.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_bce.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_cas.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/if_lge.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_nge.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_sis.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_sk.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_vge.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_vr.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_wb.c | 4 |
10 files changed, 21 insertions, 21 deletions
diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c index 3794f9b0530..aadeb1c96b5 100644 --- a/sys/dev/pci/if_ale.c +++ b/sys/dev/pci/if_ale.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ale.c,v 1.27 2013/08/07 01:06:33 bluhm Exp $ */ +/* $OpenBSD: if_ale.c,v 1.28 2013/08/21 05:21:43 dlg Exp $ */ /*- * Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -1548,7 +1548,7 @@ ale_rxeof(struct ale_softc *sc) * on these low-end consumer ethernet controller. */ m = m_devget((char *)(rs + 1), length - ETHER_CRC_LEN, - ETHER_ALIGN, ifp, NULL); + ETHER_ALIGN, ifp); if (m == NULL) { ifp->if_iqdrops++; ale_rx_update_page(sc, &rx_page, length, &prod); diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c index 5ef750d3464..5b745973e6e 100644 --- a/sys/dev/pci/if_bce.c +++ b/sys/dev/pci/if_bce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bce.c,v 1.36 2013/08/07 01:06:33 bluhm Exp $ */ +/* $OpenBSD: if_bce.c,v 1.37 2013/08/21 05:21:43 dlg Exp $ */ /* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */ /* @@ -753,7 +753,7 @@ bce_rxintr(struct bce_softc *sc) len -= ETHER_CRC_LEN; m = m_devget(sc->bce_data + i * MCLBYTES + - BCE_PREPKT_HEADER_SIZE, len, ETHER_ALIGN, ifp, NULL); + BCE_PREPKT_HEADER_SIZE, len, ETHER_ALIGN, ifp); ifp->if_ipackets++; #if NBPFILTER > 0 diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index cd62796915d..37d6985418a 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cas.c,v 1.32 2011/04/03 15:36:02 jasper Exp $ */ +/* $OpenBSD: if_cas.c,v 1.33 2013/08/21 05:21:44 dlg Exp $ */ /* * @@ -1192,7 +1192,7 @@ cas_rint(struct cas_softc *sc) rxs->rxs_dmamap->dm_mapsize, BUS_DMASYNC_POSTREAD); cp = rxs->rxs_kva + off * 256 + ETHER_ALIGN; - m = m_devget(cp, len, ETHER_ALIGN, ifp, NULL); + m = m_devget(cp, len, ETHER_ALIGN, ifp); if (word[0] & CAS_RC0_RELEASE_HDR) cas_add_rxbuf(sc, idx); @@ -1228,7 +1228,7 @@ cas_rint(struct cas_softc *sc) /* XXX We should not be copying the packet here. */ cp = rxs->rxs_kva + off + ETHER_ALIGN; - m = m_devget(cp, len, ETHER_ALIGN, ifp, NULL); + m = m_devget(cp, len, ETHER_ALIGN, ifp); if (word[0] & CAS_RC0_RELEASE_DATA) cas_add_rxbuf(sc, idx); diff --git a/sys/dev/pci/if_lge.c b/sys/dev/pci/if_lge.c index fa97c0854a7..7c4977aaac6 100644 --- a/sys/dev/pci/if_lge.c +++ b/sys/dev/pci/if_lge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_lge.c,v 1.58 2013/08/07 01:06:36 bluhm Exp $ */ +/* $OpenBSD: if_lge.c,v 1.59 2013/08/21 05:21:44 dlg Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -890,7 +890,7 @@ lge_rxeof(struct lge_softc *sc, int cnt) if (lge_newbuf(sc, &LGE_RXTAIL(sc), NULL) == ENOBUFS) { m0 = m_devget(mtod(m, char *), total_len, ETHER_ALIGN, - ifp, NULL); + ifp); lge_newbuf(sc, &LGE_RXTAIL(sc), m); if (m0 == NULL) { ifp->if_ierrors++; diff --git a/sys/dev/pci/if_nge.c b/sys/dev/pci/if_nge.c index 5c47a37cae7..bfc983d2f75 100644 --- a/sys/dev/pci/if_nge.c +++ b/sys/dev/pci/if_nge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nge.c,v 1.74 2013/08/07 01:06:36 bluhm Exp $ */ +/* $OpenBSD: if_nge.c,v 1.75 2013/08/21 05:21:44 dlg Exp $ */ /* * Copyright (c) 2001 Wind River Systems * Copyright (c) 1997, 1998, 1999, 2000, 2001 @@ -1295,7 +1295,7 @@ nge_rxeof(sc) if (nge_newbuf(sc, cur_rx, NULL) == ENOBUFS) { #endif m0 = m_devget(mtod(m, char *), total_len, - ETHER_ALIGN, ifp, NULL); + ETHER_ALIGN, ifp); nge_newbuf(sc, cur_rx, m); if (m0 == NULL) { ifp->if_ierrors++; diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c index 10c13e8b73f..b33fe005453 100644 --- a/sys/dev/pci/if_sis.c +++ b/sys/dev/pci/if_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sis.c,v 1.112 2013/08/07 01:06:37 bluhm Exp $ */ +/* $OpenBSD: if_sis.c,v 1.113 2013/08/21 05:21:44 dlg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -1402,7 +1402,7 @@ sis_rxeof(struct sis_softc *sc) { struct mbuf *m0; m0 = m_devget(mtod(m, char *), total_len, ETHER_ALIGN, - ifp, NULL); + ifp); m_freem(m); if (m0 == NULL) { ifp->if_ierrors++; diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 2cbb83fdbac..85269227228 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.165 2013/08/07 01:06:37 bluhm Exp $ */ +/* $OpenBSD: if_sk.c,v 1.166 2013/08/21 05:21:44 dlg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1740,7 +1740,7 @@ sk_rxeof(struct sk_if_softc *sc_if) if (sk_newbuf(sc_if, cur, NULL, dmamap) == ENOBUFS) { struct mbuf *m0; m0 = m_devget(mtod(m, char *), total_len, ETHER_ALIGN, - ifp, NULL); + ifp); sk_newbuf(sc_if, cur, m, dmamap); if (m0 == NULL) { ifp->if_ierrors++; diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index cb813ccbc8f..658fa5114f1 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vge.c,v 1.56 2013/08/07 01:06:38 bluhm Exp $ */ +/* $OpenBSD: if_vge.c,v 1.57 2013/08/21 05:21:44 dlg Exp $ */ /* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -1081,7 +1081,7 @@ vge_rxeof(struct vge_softc *sc) } m0 = m_devget(mtod(m, char *), - total_len - ETHER_CRC_LEN, ETHER_ALIGN, ifp, NULL); + total_len - ETHER_CRC_LEN, ETHER_ALIGN, ifp); vge_newbuf(sc, i, m); if (m0 == NULL) { ifp->if_ierrors++; diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index cb460c3ba5d..394451e3baa 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.129 2013/08/07 01:06:38 bluhm Exp $ */ +/* $OpenBSD: if_vr.c,v 1.130 2013/08/21 05:21:44 dlg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -902,7 +902,7 @@ vr_rxeof(struct vr_softc *sc) { struct mbuf *m0; m0 = m_devget(mtod(m, caddr_t), total_len, - ETHER_ALIGN, ifp, NULL); + ETHER_ALIGN, ifp); m_freem(m); if (m0 == NULL) { ifp->if_ierrors++; diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index c79b4c0e514..96762a10723 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.52 2013/08/07 01:06:39 bluhm Exp $ */ +/* $OpenBSD: if_wb.c,v 1.53 2013/08/21 05:21:45 dlg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -976,7 +976,7 @@ void wb_rxeof(sc) total_len -= ETHER_CRC_LEN; m = m_devget(cur_rx->wb_buf + sizeof(u_int64_t), total_len, - ETHER_ALIGN, ifp, NULL); + ETHER_ALIGN, ifp); wb_newbuf(sc, cur_rx); if (m == NULL) { ifp->if_ierrors++; |