Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Remove the 'copy' argument from m_devget(), unused. While he...
details: https://anonhg.NetBSD.org/src/rev/78f8e4994074
branches: trunk
changeset: 445868:78f8e4994074
user: maxv <maxv%NetBSD.org@localhost>
date: Thu Nov 15 10:56:29 2018 +0000
description:
Remove the 'copy' argument from m_devget(), unused. While here rename
off0->off.
diffstat:
share/man/man9/mbuf.9 | 9 ++++-----
sys/dev/ic/wi.c | 6 +++---
sys/dev/pci/if_ale.c | 6 +++---
sys/dev/pci/if_cas.c | 8 ++++----
sys/dev/pci/if_sk.c | 6 +++---
sys/dev/pcmcia/if_malo_pcmcia.c | 6 +++---
sys/dev/ppbus/if_plip.c | 8 ++++----
sys/dev/usb/if_umb.c | 6 +++---
sys/dev/usb/if_upgt.c | 6 +++---
sys/kern/uipc_mbuf.c | 14 +++++---------
sys/sys/mbuf.h | 5 ++---
11 files changed, 37 insertions(+), 43 deletions(-)
diffs (truncated from 331 to 300 lines):
diff -r 8a32ad67d3f8 -r 78f8e4994074 share/man/man9/mbuf.9
--- a/share/man/man9/mbuf.9 Thu Nov 15 10:37:26 2018 +0000
+++ b/share/man/man9/mbuf.9 Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: mbuf.9,v 1.64 2018/05/07 10:53:45 maxv Exp $
+.\" $NetBSD: mbuf.9,v 1.65 2018/11/15 10:56:29 maxv Exp $
.\"
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -74,7 +74,7 @@
.Ft struct mbuf *
.Fn m_gethdr "int how" "int type"
.Ft struct mbuf *
-.Fn m_devget "char *buf" "int totlen" "int off0" "struct ifnet *ifp" "void (*copy)(const void *, void *, size_t)"
+.Fn m_devget "char *buf" "int totlen" "int off" "struct ifnet *ifp"
.Ft struct mbuf *
.Fn m_copym "struct mbuf *m" "int off" "int len" "int wait"
.Ft struct mbuf *
@@ -254,11 +254,10 @@
The
.Fa type
parameter is an mbuf type.
-.It Fn m_devget "char *buf" "int totlen" "int off0" "struct ifnet *ifp" "void (*copy)(const void *, void *, size_t)"
+.It Fn m_devget "char *buf" "int totlen" "int off" "struct ifnet *ifp"
Copies
.Fa len
-bytes from device local memory into mbufs using copy routine
-.Fa copy .
+bytes from device local memory into mbufs.
If parameter
.Fa off
is non-zero, the packet is supposed to be trailer-encapsulated and
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/dev/ic/wi.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wi.c,v 1.248 2018/09/03 16:29:31 riastradh Exp $ */
+/* $NetBSD: wi.c,v 1.249 2018/11/15 10:56:29 maxv Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.248 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.249 2018/11/15 10:56:29 maxv Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -2512,7 +2512,7 @@
break;
}
/* XXX wi_len looks in u_int8_t, not in u_int16_t */
- m = m_devget((char *)&wreq.wi_val, wreq.wi_len, 0, ifp, NULL);
+ m = m_devget((char *)&wreq.wi_val, wreq.wi_len, 0, ifp);
if (m == NULL) {
error = ENOMEM;
break;
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/dev/pci/if_ale.c
--- a/sys/dev/pci/if_ale.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/dev/pci/if_ale.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ale.c,v 1.24 2018/06/26 06:48:01 msaitoh Exp $ */
+/* $NetBSD: if_ale.c,v 1.25 2018/11/15 10:56:29 maxv Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari%FreeBSD.org@localhost>
@@ -32,7 +32,7 @@
/* Driver for Atheros AR8121/AR8113/AR8114 PCIe Ethernet. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.24 2018/06/26 06:48:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ale.c,v 1.25 2018/11/15 10:56:29 maxv Exp $");
#include "vlan.h"
@@ -1526,7 +1526,7 @@
* on these low-end consumer ethernet controller.
*/
m = m_devget((char *)(rs + 1), length - ETHER_CRC_LEN,
- 0, ifp, NULL);
+ 0, ifp);
if (m == NULL) {
ifp->if_iqdrops++;
ale_rx_update_page(sc, &rx_page, length, &prod);
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/dev/pci/if_cas.c
--- a/sys/dev/pci/if_cas.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/dev/pci/if_cas.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cas.c,v 1.27 2018/06/26 06:48:01 msaitoh Exp $ */
+/* $NetBSD: if_cas.c,v 1.28 2018/11/15 10:56:29 maxv Exp $ */
/* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */
/*
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.27 2018/06/26 06:48:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.28 2018/11/15 10:56:29 maxv Exp $");
#ifndef _MODULE
#include "opt_inet.h"
@@ -1289,7 +1289,7 @@
rxs->rxs_dmamap->dm_mapsize, BUS_DMASYNC_POSTREAD);
cp = rxs->rxs_kva + off * 256 + ETHER_ALIGN;
- m = m_devget(cp, len, 0, ifp, NULL);
+ m = m_devget(cp, len, 0, ifp);
if (word[0] & CAS_RC0_RELEASE_HDR)
cas_add_rxbuf(sc, idx);
@@ -1320,7 +1320,7 @@
/* XXX We should not be copying the packet here. */
cp = rxs->rxs_kva + off + ETHER_ALIGN;
- m = m_devget(cp, len, 0, ifp, NULL);
+ m = m_devget(cp, len, 0, ifp);
if (word[0] & CAS_RC0_RELEASE_DATA)
cas_add_rxbuf(sc, idx);
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/dev/pci/if_sk.c
--- a/sys/dev/pci/if_sk.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/dev/pci/if_sk.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_sk.c,v 1.89 2018/07/04 19:26:09 jdolecek Exp $ */
+/* $NetBSD: if_sk.c,v 1.90 2018/11/15 10:56:29 maxv Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -115,7 +115,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.89 2018/07/04 19:26:09 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sk.c,v 1.90 2018/11/15 10:56:29 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2102,7 +2102,7 @@
if (sk_newbuf(sc_if, cur, NULL, dmamap) == ENOBUFS) {
struct mbuf *m0;
m0 = m_devget(mtod(m, char *) - ETHER_ALIGN,
- total_len + ETHER_ALIGN, 0, ifp, NULL);
+ total_len + ETHER_ALIGN, 0, ifp);
sk_newbuf(sc_if, cur, m, dmamap);
if (m0 == NULL) {
aprint_error_dev(sc_if->sk_dev, "no receive "
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/dev/pcmcia/if_malo_pcmcia.c
--- a/sys/dev/pcmcia/if_malo_pcmcia.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/dev/pcmcia/if_malo_pcmcia.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_malo_pcmcia.c,v 1.18 2018/06/26 06:48:01 msaitoh Exp $ */
+/* $NetBSD: if_malo_pcmcia.c,v 1.19 2018/11/15 10:56:29 maxv Exp $ */
/* $OpenBSD: if_malo.c,v 1.65 2009/03/29 21:53:53 sthen Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_malo_pcmcia.c,v 1.18 2018/06/26 06:48:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_malo_pcmcia.c,v 1.19 2018/11/15 10:56:29 maxv Exp $");
#ifdef _MODULE
#include <sys/module.h>
@@ -1044,7 +1044,7 @@
#define ETHER_ALIGN 2 /* XXX */
/* prepare mbuf */
m = m_devget(sc->sc_data + rxdesc->pkgoffset,
- rxdesc->pkglen, ETHER_ALIGN, ifp, NULL);
+ rxdesc->pkglen, ETHER_ALIGN, ifp);
if (m == NULL) {
DPRINTF(1, "RX m_devget failed\n");
ifp->if_ierrors++;
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/dev/ppbus/if_plip.c
--- a/sys/dev/ppbus/if_plip.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/dev/ppbus/if_plip.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_plip.c,v 1.32 2018/11/05 18:37:18 mlelstv Exp $ */
+/* $NetBSD: if_plip.c,v 1.33 2018/11/15 10:56:30 maxv Exp $ */
/*-
* Copyright (c) 1997 Poul-Henning Kamp
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.32 2018/11/05 18:37:18 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.33 2018/11/15 10:56:30 maxv Exp $");
/*
* Parallel port TCP/IP interfaces added. I looked at the driver from
@@ -606,7 +606,7 @@
if (len <= CLPIPHDRLEN)
goto err;
len -= CLPIPHDRLEN;
- top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, ifp, NULL);
+ top = m_devget(sc->sc_ifbuf + CLPIPHDRLEN, len, 0, ifp);
}
/* FreeBSD protocol receiving */
else {
@@ -642,7 +642,7 @@
if (len <= LPIPHDRLEN)
goto err;
len -= LPIPHDRLEN;
- top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, ifp, NULL);
+ top = m_devget(sc->sc_ifbuf + LPIPHDRLEN, len, 0, ifp);
}
if (top == NULL) {
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/dev/usb/if_umb.c
--- a/sys/dev/usb/if_umb.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/dev/usb/if_umb.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_umb.c,v 1.6 2018/09/20 09:48:54 khorben Exp $ */
+/* $NetBSD: if_umb.c,v 1.7 2018/11/15 10:56:30 maxv Exp $ */
/* $OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */
/*
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.6 2018/09/20 09:48:54 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.7 2018/11/15 10:56:30 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2026,7 +2026,7 @@
dp = buf + doff;
DPRINTFN(3, "%s: decap %d bytes\n", DEVNAM(sc), dlen);
- m = m_devget(dp, dlen, 0, ifp, NULL);
+ m = m_devget(dp, dlen, 0, ifp);
if (m == NULL) {
ifp->if_iqdrops++;
continue;
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/dev/usb/if_upgt.c
--- a/sys/dev/usb/if_upgt.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/dev/usb/if_upgt.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_upgt.c,v 1.22 2018/08/02 06:09:04 riastradh Exp $ */
+/* $NetBSD: if_upgt.c,v 1.23 2018/11/15 10:56:30 maxv Exp $ */
/* $OpenBSD: if_upgt.c,v 1.49 2010/04/20 22:05:43 tedu Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_upgt.c,v 1.22 2018/08/02 06:09:04 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_upgt.c,v 1.23 2018/11/15 10:56:30 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1842,7 +1842,7 @@
/* create mbuf which is suitable for strict alignment archs */
#define ETHER_ALIGN 0
- m = m_devget(rxdesc->data, pkglen, ETHER_ALIGN, ifp, NULL);
+ m = m_devget(rxdesc->data, pkglen, ETHER_ALIGN, ifp);
if (m == NULL) {
DPRINTF(1, "%s: could not create RX mbuf\n",
device_xname(sc->sc_dev));
diff -r 8a32ad67d3f8 -r 78f8e4994074 sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c Thu Nov 15 10:37:26 2018 +0000
+++ b/sys/kern/uipc_mbuf.c Thu Nov 15 10:56:29 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.224 2018/11/15 10:37:26 maxv Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.225 2018/11/15 10:56:30 maxv Exp $ */
/*
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.224 2018/11/15 10:37:26 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.225 2018/11/15 10:56:30 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@@ -1322,13 +1322,12 @@
* Routine to copy from device local memory into mbufs.
*/
struct mbuf *
-m_devget(char *buf, int totlen, int off0, struct ifnet *ifp,
- void (*copy)(const void *from, void *to, size_t len))
+m_devget(char *buf, int totlen, int off, struct ifnet *ifp)
{
struct mbuf *m;
struct mbuf *top = NULL, **mp = ⊤
- int off = off0, len;
char *cp, *epkt;
+ int len;
cp = buf;
epkt = cp + totlen;
Home |
Main Index |
Thread Index |
Old Index