Replace: M_COPY_PKTHDR -> m_copy_pkthdr. No functional change, since the

former is a macro to the latter.
This commit is contained in:
maxv 2018-12-22 14:07:53 +00:00
parent fc568a6805
commit 7971121357
12 changed files with 36 additions and 36 deletions

View File

@ -35,7 +35,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.32 2018/09/03 16:29:23 riastradh Exp $");
__KERNEL_RCSID(1, "$NetBSD: bcm53xx_eth.c,v 1.33 2018/12/22 14:07:53 maxv Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@ -1546,7 +1546,7 @@ bcmeth_copy_packet(struct mbuf *m)
if (m0 == NULL) {
return NULL;
}
M_COPY_PKTHDR(m0, m);
m_copy_pkthdr(m0, m);
MCLAIM(m0, m->m_owner);
if (m0->m_pkthdr.len > MHLEN) {
MCLGET(m0, M_DONTWAIT);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ixp425_if_npe.c,v 1.34 2018/06/26 06:47:58 msaitoh Exp $ */
/* $NetBSD: ixp425_if_npe.c,v 1.35 2018/12/22 14:07:53 maxv Exp $ */
/*-
* Copyright (c) 2006 Sam Leffler. All rights reserved.
@ -28,7 +28,7 @@
#if 0
__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
#endif
__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.34 2018/06/26 06:47:58 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.35 2018/12/22 14:07:53 maxv Exp $");
/*
* Intel XScale NPE Ethernet driver.
@ -1232,7 +1232,7 @@ npe_defrag(struct mbuf *m0)
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
return (NULL);
M_COPY_PKTHDR(m, m0);
m_copy_pkthdr(m, m0);
if ((m->m_len = m0->m_pkthdr.len) > MHLEN) {
MCLGET(m, M_DONTWAIT);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bwi.c,v 1.35 2018/07/25 07:55:44 msaitoh Exp $ */
/* $NetBSD: bwi.c,v 1.36 2018/12/22 14:07:53 maxv Exp $ */
/* $OpenBSD: bwi.c,v 1.74 2008/02/25 21:13:30 mglocker Exp $ */
/*
@ -48,7 +48,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.35 2018/07/25 07:55:44 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.36 2018/12/22 14:07:53 maxv Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -9192,7 +9192,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m,
goto back;
}
M_COPY_PKTHDR(m_new, m);
m_copy_pkthdr(m_new, m);
if (m->m_pkthdr.len > MHLEN) {
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: rt2560.c,v 1.35 2018/09/03 16:29:31 riastradh Exp $ */
/* $NetBSD: rt2560.c,v 1.36 2018/12/22 14:07:53 maxv Exp $ */
/* $OpenBSD: rt2560.c,v 1.15 2006/04/20 20:31:12 miod Exp $ */
/* $FreeBSD: rt2560.c,v 1.3 2006/03/21 21:15:43 damien Exp $*/
@ -24,7 +24,7 @@
* http://www.ralinktech.com/
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.35 2018/09/03 16:29:31 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.36 2018/12/22 14:07:53 maxv Exp $");
#include <sys/param.h>
@ -2016,7 +2016,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0,
return ENOMEM;
}
M_COPY_PKTHDR(mnew, m0);
m_copy_pkthdr(mnew, m0);
if (m0->m_pkthdr.len > MHLEN) {
MCLGET(mnew, M_DONTWAIT);
if (!(mnew->m_flags & M_EXT)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: rt2661.c,v 1.40 2018/09/03 16:29:31 riastradh Exp $ */
/* $NetBSD: rt2661.c,v 1.41 2018/12/22 14:07:53 maxv Exp $ */
/* $OpenBSD: rt2661.c,v 1.17 2006/05/01 08:41:11 damien Exp $ */
/* $FreeBSD: rt2560.c,v 1.5 2006/06/02 19:59:31 csjp Exp $ */
@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.40 2018/09/03 16:29:31 riastradh Exp $");
__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.41 2018/12/22 14:07:53 maxv Exp $");
#include <sys/param.h>
@ -1753,7 +1753,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0,
return ENOMEM;
}
M_COPY_PKTHDR(mnew, m0);
m_copy_pkthdr(mnew, m0);
if (m0->m_pkthdr.len > MHLEN) {
MCLGET(mnew, M_DONTWAIT);
if (!(mnew->m_flags & M_EXT)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_et.c,v 1.18 2018/12/09 11:14:02 jdolecek Exp $ */
/* $NetBSD: if_et.c,v 1.19 2018/12/22 14:07:53 maxv Exp $ */
/* $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.18 2018/12/09 11:14:02 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.19 2018/12/22 14:07:53 maxv Exp $");
#include "opt_inet.h"
#include "vlan.h"
@ -1826,7 +1826,7 @@ et_encap(struct et_softc *sc, struct mbuf **m0)
goto back;
}
M_COPY_PKTHDR(m_new, m);
m_copy_pkthdr(m_new, m);
if (m->m_pkthdr.len > MHLEN) {
MCLGET(m_new, M_DONTWAIT);
if (!(m_new->m_flags & M_EXT)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ipw.c,v 1.70 2018/12/09 11:14:02 jdolecek Exp $ */
/* $NetBSD: if_ipw.c,v 1.71 2018/12/22 14:07:53 maxv Exp $ */
/* FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp */
/*-
@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.70 2018/12/09 11:14:02 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.71 2018/12/22 14:07:53 maxv Exp $");
/*-
* Intel(R) PRO/Wireless 2100 MiniPCI driver
@ -1420,7 +1420,7 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni)
return ENOMEM;
}
M_COPY_PKTHDR(mnew, m0);
m_copy_pkthdr(mnew, m0);
/* If the data won't fit in the header, get a cluster */
if (m0->m_pkthdr.len > MHLEN) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_iwi.c,v 1.109 2018/12/09 11:14:02 jdolecek Exp $ */
/* $NetBSD: if_iwi.c,v 1.110 2018/12/22 14:07:53 maxv Exp $ */
/* $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $ */
/*-
@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.109 2018/12/09 11:14:02 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.110 2018/12/22 14:07:53 maxv Exp $");
/*-
* Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@ -1691,7 +1691,7 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni,
return ENOMEM;
}
M_COPY_PKTHDR(mnew, m0);
m_copy_pkthdr(mnew, m0);
/* If the data won't fit in the header, get a cluster */
if (m0->m_pkthdr.len > MHLEN) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wpi.c,v 1.84 2018/12/09 11:14:02 jdolecek Exp $ */
/* $NetBSD: if_wpi.c,v 1.85 2018/12/22 14:07:53 maxv Exp $ */
/*-
* Copyright (c) 2006, 2007
@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.84 2018/12/09 11:14:02 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_wpi.c,v 1.85 2018/12/22 14:07:53 maxv Exp $");
/*
* Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
@ -2037,7 +2037,7 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni,
m_freem(m0);
return ENOMEM;
}
M_COPY_PKTHDR(mnew, m0);
m_copy_pkthdr(mnew, m0);
if (m0->m_pkthdr.len > MHLEN) {
MCLGET(mnew, M_DONTWAIT);
if (!(mnew->m_flags & M_EXT)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: ubsec.c,v 1.45 2018/12/09 11:14:02 jdolecek Exp $ */
/* $NetBSD: ubsec.c,v 1.46 2018/12/22 14:07:53 maxv Exp $ */
/* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.6 2003/01/23 21:06:43 sam Exp $ */
/* $OpenBSD: ubsec.c,v 1.143 2009/03/27 13:31:30 reyk Exp$ */
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.45 2018/12/09 11:14:02 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: ubsec.c,v 1.46 2018/12/22 14:07:53 maxv Exp $");
#undef UBSEC_DEBUG
@ -1589,7 +1589,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint)
}
if (len == MHLEN)
/*XXX was M_DUP_PKTHDR*/
M_COPY_PKTHDR(m, q->q_src_m);
m_copy_pkthdr(m, q->q_src_m);
if (totlen >= MINCLSIZE) {
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_mbuf.c,v 1.227 2018/12/22 13:55:56 maxv Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.228 2018/12/22 14:07:53 maxv Exp $ */
/*
* Copyright (c) 1999, 2001, 2018 The NetBSD Foundation, Inc.
@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.227 2018/12/22 13:55:56 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.228 2018/12/22 14:07:53 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_mbuftrace.h"
@ -714,7 +714,7 @@ m_copy_internal(struct mbuf *m, int off0, int len, int wait, bool deep)
MCLAIM(n, m->m_owner);
if (copyhdr) {
M_COPY_PKTHDR(n, m);
m_copy_pkthdr(n, m);
if (len == M_COPYALL)
n->m_pkthdr.len -= off0;
else
@ -784,7 +784,7 @@ m_copypacket(struct mbuf *m, int how)
goto nospace;
MCLAIM(n, m->m_owner);
M_COPY_PKTHDR(n, m);
m_copy_pkthdr(n, m);
n->m_len = m->m_len;
if (m->m_flags & M_EXT) {
n->m_data = m->m_data;

View File

@ -1,4 +1,4 @@
/* $NetBSD: icmp6.c,v 1.241 2018/12/22 13:11:38 maxv Exp $ */
/* $NetBSD: icmp6.c,v 1.242 2018/12/22 14:07:54 maxv Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.241 2018/12/22 13:11:38 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.242 2018/12/22 14:07:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -766,7 +766,7 @@ _icmp6_input(struct mbuf *m, int off, int proto)
memset(p, 0, 4);
memcpy(p + 4, hostname, maxhlen); /* meaningless TTL */
M_COPY_PKTHDR(n, m);
m_copy_pkthdr(n, m);
n->m_pkthdr.len = n->m_len = sizeof(struct ip6_hdr) +
sizeof(struct icmp6_hdr) + 4 + maxhlen;
nicmp6->icmp6_type = ICMP6_WRUREPLY;