Replace: M_MOVE_PKTHDR -> m_move_pkthdr. No functional change, since the

former is a macro to the latter.
This commit is contained in:
maxv 2018-12-22 13:11:37 +00:00
parent c8899fa5b4
commit b1305a6d63
14 changed files with 46 additions and 46 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_enet.c,v 1.15 2018/09/03 16:29:23 riastradh Exp $ */ /* $NetBSD: if_enet.c,v 1.16 2018/12/22 13:11:37 maxv Exp $ */
/* /*
* Copyright (c) 2014 Ryo Shimizu <ryo@nerv.org> * Copyright (c) 2014 Ryo Shimizu <ryo@nerv.org>
@ -31,7 +31,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.15 2018/09/03 16:29:23 riastradh Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.16 2018/12/22 13:11:37 maxv Exp $");
#include "vlan.h" #include "vlan.h"
@ -1505,7 +1505,7 @@ enet_encap_mbufalign(struct mbuf **mp)
} }
MCLAIM(x, m->m_owner); MCLAIM(x, m->m_owner);
if (m->m_flags & M_PKTHDR) if (m->m_flags & M_PKTHDR)
M_MOVE_PKTHDR(x, m); m_move_pkthdr(x, m);
x->m_len = m->m_len; x->m_len = m->m_len;
x->m_data = ALIGN_PTR(x->m_data, x->m_data = ALIGN_PTR(x->m_data,
ALIGNBYTE); ALIGNBYTE);
@ -1630,7 +1630,7 @@ enet_encap_mbufalign(struct mbuf **mp)
} }
MCLAIM(x, m->m_owner); MCLAIM(x, m->m_owner);
if (m->m_flags & M_PKTHDR) if (m->m_flags & M_PKTHDR)
M_MOVE_PKTHDR(x, m); m_move_pkthdr(x, m);
x->m_data = ALIGN_PTR(x->m_data, ALIGNBYTE); x->m_data = ALIGN_PTR(x->m_data, ALIGNBYTE);
memcpy(mtod(x, void *), mtod(m, void *), memcpy(mtod(x, void *), mtod(m, void *),
chiplen); chiplen);

View File

@ -1,4 +1,4 @@
/* $NetBSD: pq3etsec.c,v 1.37 2018/09/03 16:29:26 riastradh Exp $ */ /* $NetBSD: pq3etsec.c,v 1.38 2018/12/22 13:11:37 maxv Exp $ */
/*- /*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
@ -41,7 +41,7 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.37 2018/09/03 16:29:26 riastradh Exp $"); __KERNEL_RCSID(0, "$NetBSD: pq3etsec.c,v 1.38 2018/12/22 13:11:37 maxv Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/cpu.h> #include <sys/cpu.h>
@ -2107,7 +2107,7 @@ pq3etsec_tx_offload(
return; return;
} }
M_MOVE_PKTHDR(mn, m); m_move_pkthdr(mn, m);
mn->m_next = m; mn->m_next = m;
m = mn; m = mn;
MH_ALIGN(m, sizeof(fcb)); MH_ALIGN(m, sizeof(fcb));

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_mbuf.c,v 1.225 2018/11/15 10:56:30 maxv Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.226 2018/12/22 13:11:37 maxv Exp $ */
/* /*
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@ -62,7 +62,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.225 2018/11/15 10:56:30 maxv Exp $"); __KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.226 2018/12/22 13:11:37 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_mbuftrace.h" #include "opt_mbuftrace.h"
@ -637,7 +637,7 @@ m_prepend(struct mbuf *m, int len, int how)
} }
if (m->m_flags & M_PKTHDR) { if (m->m_flags & M_PKTHDR) {
M_MOVE_PKTHDR(mn, m); m_move_pkthdr(mn, m);
} else { } else {
MCLAIM(mn, m->m_owner); MCLAIM(mn, m->m_owner);
} }
@ -995,7 +995,7 @@ m_ensure_contig(struct mbuf **m0, int len)
} }
MCLAIM(m, n->m_owner); MCLAIM(m, n->m_owner);
if (n->m_flags & M_PKTHDR) { if (n->m_flags & M_PKTHDR) {
M_MOVE_PKTHDR(m, n); m_move_pkthdr(m, n);
} }
} }
space = &m->m_dat[MLEN] - (m->m_data + m->m_len); space = &m->m_dat[MLEN] - (m->m_data + m->m_len);
@ -1216,7 +1216,7 @@ m_copyup(struct mbuf *n, int len, int dstoff)
goto bad; goto bad;
MCLAIM(m, n->m_owner); MCLAIM(m, n->m_owner);
if (n->m_flags & M_PKTHDR) { if (n->m_flags & M_PKTHDR) {
M_MOVE_PKTHDR(m, n); m_move_pkthdr(m, n);
} }
m->m_data += dstoff; m->m_data += dstoff;
space = &m->m_dat[MLEN] - (m->m_data + m->m_len); space = &m->m_dat[MLEN] - (m->m_data + m->m_len);
@ -1584,7 +1584,7 @@ extend:
goto enobufs; goto enobufs;
MCLAIM(n, m->m_owner); MCLAIM(n, m->m_owner);
if (off == 0 && (m->m_flags & M_PKTHDR) != 0) { if (off == 0 && (m->m_flags & M_PKTHDR) != 0) {
M_MOVE_PKTHDR(n, m); m_move_pkthdr(n, m);
n->m_len = MHLEN; n->m_len = MHLEN;
} else { } else {
if (len >= MINCLSIZE) if (len >= MINCLSIZE)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_l2tp.c,v 1.30 2018/10/19 00:12:56 knakahara Exp $ */ /* $NetBSD: if_l2tp.c,v 1.31 2018/12/22 13:11:37 maxv Exp $ */
/* /*
* Copyright (c) 2017 Internet Initiative Japan Inc. * Copyright (c) 2017 Internet Initiative Japan Inc.
@ -31,7 +31,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.30 2018/10/19 00:12:56 knakahara Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.31 2018/12/22 13:11:37 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_inet.h" #include "opt_inet.h"
@ -506,7 +506,7 @@ l2tp_input(struct mbuf *m, struct ifnet *ifp)
m_freem(m); m_freem(m);
return; return;
} }
M_MOVE_PKTHDR(m_head, m); m_move_pkthdr(m_head, m);
/* /*
* m_head should be: * m_head should be:

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sl.c,v 1.129 2018/04/20 09:56:22 knakahara Exp $ */ /* $NetBSD: if_sl.c,v 1.130 2018/12/22 13:11:37 maxv Exp $ */
/* /*
* Copyright (c) 1987, 1989, 1992, 1993 * Copyright (c) 1987, 1989, 1992, 1993
@ -60,7 +60,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.129 2018/04/20 09:56:22 knakahara Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.130 2018/12/22 13:11:37 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_inet.h" #include "opt_inet.h"
@ -946,7 +946,7 @@ slintr(void *arg)
int pktlen; int pktlen;
pktlen = m->m_pkthdr.len; pktlen = m->m_pkthdr.len;
M_MOVE_PKTHDR(n, m); m_move_pkthdr(n, m);
memcpy(mtod(n, void *), mtod(m, void *), pktlen); memcpy(mtod(n, void *), mtod(m, void *), pktlen);
n->m_len = m->m_len; n->m_len = m->m_len;
m_freem(m); m_freem(m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_strip.c,v 1.110 2018/06/06 01:49:09 maya Exp $ */ /* $NetBSD: if_strip.c,v 1.111 2018/12/22 13:11:37 maxv Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */ /* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/* /*
@ -87,7 +87,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.110 2018/06/06 01:49:09 maya Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.111 2018/12/22 13:11:37 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_inet.h" #include "opt_inet.h"
@ -1238,7 +1238,7 @@ stripintr(void *arg)
int pktlen; int pktlen;
pktlen = m->m_pkthdr.len; pktlen = m->m_pkthdr.len;
M_MOVE_PKTHDR(n, m); m_move_pkthdr(n, m);
memcpy(mtod(n, void *), mtod(m, void *), pktlen); memcpy(mtod(n, void *), mtod(m, void *), pktlen);
n->m_len = m->m_len; n->m_len = m->m_len;
m_freem(m); m_freem(m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee80211_input.c,v 1.114 2018/06/26 06:48:03 msaitoh Exp $ */ /* $NetBSD: ieee80211_input.c,v 1.115 2018/12/22 13:11:37 maxv Exp $ */
/* /*
* Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2001 Atsushi Onoe
@ -37,7 +37,7 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $"); __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
#endif #endif
#ifdef __NetBSD__ #ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.114 2018/06/26 06:48:03 msaitoh Exp $"); __KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.115 2018/12/22 13:11:37 maxv Exp $");
#endif #endif
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
@ -996,7 +996,7 @@ ieee80211_decap(struct mbuf *m, int hdrlen)
m_freem(m); m_freem(m);
return NULL; return NULL;
} }
M_MOVE_PKTHDR(n, m); m_move_pkthdr(n, m);
n->m_len = MHLEN; n->m_len = MHLEN;
} else { } else {
MGET(n, M_DONTWAIT, MT_DATA); MGET(n, M_DONTWAIT, MT_DATA);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee80211_output.c,v 1.63 2018/05/08 07:02:07 maxv Exp $ */ /* $NetBSD: ieee80211_output.c,v 1.64 2018/12/22 13:11:37 maxv Exp $ */
/* /*
* Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2001 Atsushi Onoe
@ -37,7 +37,7 @@
__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.34 2005/08/10 16:22:29 sam Exp $"); __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.34 2005/08/10 16:22:29 sam Exp $");
#endif #endif
#ifdef __NetBSD__ #ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.63 2018/05/08 07:02:07 maxv Exp $"); __KERNEL_RCSID(0, "$NetBSD: ieee80211_output.c,v 1.64 2018/12/22 13:11:37 maxv Exp $");
#endif #endif
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
@ -444,7 +444,7 @@ ieee80211_mbuf_adjust(struct ieee80211com *ic, int hdrsize,
* required (the latter are added when the driver calls * required (the latter are added when the driver calls
* back to ieee80211_crypto_encap to do crypto encapsulation). * back to ieee80211_crypto_encap to do crypto encapsulation).
*/ */
M_MOVE_PKTHDR(n, m); m_move_pkthdr(n, m);
n->m_len = 0; n->m_len = 0;
n->m_data += needed_space; n->m_data += needed_space;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_output.c,v 1.308 2018/12/12 01:53:52 rin Exp $ */ /* $NetBSD: ip_output.c,v 1.309 2018/12/22 13:11:38 maxv Exp $ */
/* /*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -91,7 +91,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.308 2018/12/12 01:53:52 rin Exp $"); __KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.309 2018/12/22 13:11:38 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_inet.h" #include "opt_inet.h"
@ -999,7 +999,7 @@ ip_insertoptions(struct mbuf *m, struct mbuf *opt, int *phlen)
if (n == NULL) if (n == NULL)
return m; return m;
MCLAIM(n, m->m_owner); MCLAIM(n, m->m_owner);
M_MOVE_PKTHDR(n, m); m_move_pkthdr(n, m);
m->m_len -= sizeof(struct ip); m->m_len -= sizeof(struct ip);
m->m_data += sizeof(struct ip); m->m_data += sizeof(struct ip);
n->m_next = m; n->m_next = m;

View File

@ -1,4 +1,4 @@
/* $NetBSD: sctp_indata.c,v 1.7 2018/09/03 16:29:36 riastradh Exp $ */ /* $NetBSD: sctp_indata.c,v 1.8 2018/12/22 13:11:38 maxv Exp $ */
/* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */ /* $KAME: sctp_indata.c,v 1.36 2005/03/06 16:04:17 itojun Exp $ */
/* /*
@ -31,7 +31,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sctp_indata.c,v 1.7 2018/09/03 16:29:36 riastradh Exp $"); __KERNEL_RCSID(0, "$NetBSD: sctp_indata.c,v 1.8 2018/12/22 13:11:38 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_ipsec.h" #include "opt_ipsec.h"
@ -2550,7 +2550,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
#ifdef __APPLE__ #ifdef __APPLE__
M_COPY_PKTHDR(m, (*mm)); M_COPY_PKTHDR(m, (*mm));
#else #else
M_MOVE_PKTHDR(m, (*mm)); m_move_pkthdr(m, (*mm));
#endif #endif
} }
/* get the pointers and copy */ /* get the pointers and copy */

View File

@ -1,4 +1,4 @@
/* $NetBSD: icmp6.c,v 1.240 2018/10/25 02:40:45 ozaki-r Exp $ */ /* $NetBSD: icmp6.c,v 1.241 2018/12/22 13:11:38 maxv Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */ /* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/* /*
@ -62,7 +62,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.240 2018/10/25 02:40:45 ozaki-r Exp $"); __KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.241 2018/12/22 13:11:38 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_inet.h" #include "opt_inet.h"
@ -1407,7 +1407,7 @@ ni6_input(struct mbuf *m, int off)
if (n == NULL) { if (n == NULL) {
goto bad; goto bad;
} }
M_MOVE_PKTHDR(n, m); m_move_pkthdr(n, m);
if (replylen > MHLEN) { if (replylen > MHLEN) {
if (replylen > MCLBYTES) { if (replylen > MCLBYTES) {
/* /*

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip6_output.c,v 1.214 2018/12/12 01:53:52 rin Exp $ */ /* $NetBSD: ip6_output.c,v 1.215 2018/12/22 13:11:38 maxv Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */ /* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/* /*
@ -62,7 +62,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.214 2018/12/12 01:53:52 rin Exp $"); __KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.215 2018/12/22 13:11:38 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_inet.h" #include "opt_inet.h"
@ -3260,7 +3260,7 @@ ip6_splithdr(struct mbuf *m, struct ip6_exthdrs *exthdrs)
m_freem(m); m_freem(m);
return ENOBUFS; return ENOBUFS;
} }
M_MOVE_PKTHDR(mh, m); m_move_pkthdr(mh, m);
MH_ALIGN(mh, sizeof(*ip6)); MH_ALIGN(mh, sizeof(*ip6));
m->m_len -= sizeof(*ip6); m->m_len -= sizeof(*ip6);
m->m_data += sizeof(*ip6); m->m_data += sizeof(*ip6);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec_mbuf.c,v 1.29 2018/09/03 16:29:36 riastradh Exp $ */ /* $NetBSD: ipsec_mbuf.c,v 1.30 2018/12/22 13:11:38 maxv Exp $ */
/* /*
* Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
@ -29,7 +29,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ipsec_mbuf.c,v 1.29 2018/09/03 16:29:36 riastradh Exp $"); __KERNEL_RCSID(0, "$NetBSD: ipsec_mbuf.c,v 1.30 2018/12/22 13:11:38 maxv Exp $");
/* /*
* IPsec-specific mbuf routines. * IPsec-specific mbuf routines.
@ -116,7 +116,7 @@ m_clone(struct mbuf *m0)
m_freem(m0); m_freem(m0);
return NULL; return NULL;
} }
M_MOVE_PKTHDR(n, m); m_move_pkthdr(n, m);
MCLGET(n, M_DONTWAIT); MCLGET(n, M_DONTWAIT);
if ((n->m_flags & M_EXT) == 0) { if ((n->m_flags & M_EXT) == 0) {
m_free(n); m_free(n);

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_subs.c,v 1.233 2018/09/03 16:29:36 riastradh Exp $ */ /* $NetBSD: nfs_subs.c,v 1.234 2018/12/22 13:11:38 maxv Exp $ */
/* /*
* Copyright (c) 1989, 1993 * Copyright (c) 1989, 1993
@ -70,7 +70,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.233 2018/09/03 16:29:36 riastradh Exp $"); __KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.234 2018/12/22 13:11:38 maxv Exp $");
#ifdef _KERNEL_OPT #ifdef _KERNEL_OPT
#include "opt_nfs.h" #include "opt_nfs.h"
@ -942,7 +942,7 @@ nfsm_disct(struct mbuf **mdp, char **dposp, int siz, int left, char **cp2)
*mdp = m1 = m_get(M_WAIT, MT_DATA); *mdp = m1 = m_get(M_WAIT, MT_DATA);
MCLAIM(m1, m2->m_owner); MCLAIM(m1, m2->m_owner);
if ((m2->m_flags & M_PKTHDR) != 0) { if ((m2->m_flags & M_PKTHDR) != 0) {
M_MOVE_PKTHDR(m1, m2); m_move_pkthdr(m1, m2);
} }
if (havebuf) { if (havebuf) {
havebuf->m_next = m1; havebuf->m_next = m1;