Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Use M_GETCTX
details: https://anonhg.NetBSD.org/src/rev/414f8a99567a
branches: trunk
changeset: 815564:414f8a99567a
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu May 26 05:01:11 2016 +0000
description:
Use M_GETCTX
No functional change.
diffstat:
sys/dev/ic/ath.c | 6 +++---
sys/dev/ic/athn.c | 6 +++---
sys/dev/ic/atw.c | 6 +++---
sys/dev/ic/awi.c | 6 +++---
sys/dev/ic/bwi.c | 6 +++---
sys/dev/ic/malo.c | 6 +++---
sys/dev/ic/rt2560.c | 6 +++---
sys/dev/ic/rt2661.c | 6 +++---
sys/dev/ic/rt2860.c | 6 +++---
sys/dev/ic/wi.c | 6 +++---
sys/dev/pci/if_iwm.c | 6 +++---
sys/dev/pci/if_iwn.c | 6 +++---
sys/dev/pci/if_rtwn.c | 6 +++---
sys/dev/pci/if_wpi.c | 6 +++---
sys/dev/usb/if_athn_usb.c | 6 +++---
sys/dev/usb/if_atu.c | 6 +++---
sys/dev/usb/if_otus.c | 6 +++---
sys/dev/usb/if_rum.c | 6 +++---
sys/dev/usb/if_run.c | 6 +++---
sys/dev/usb/if_upgt.c | 6 +++---
sys/dev/usb/if_ural.c | 6 +++---
sys/dev/usb/if_urtw.c | 6 +++---
sys/dev/usb/if_urtwn.c | 6 +++---
sys/dev/usb/if_zyd.c | 6 +++---
24 files changed, 72 insertions(+), 72 deletions(-)
diffs (truncated from 650 to 300 lines):
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/ath.c
--- a/sys/dev/ic/ath.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/ath.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ath.c,v 1.119 2016/04/08 14:52:56 roy Exp $ */
+/* $NetBSD: ath.c,v 1.120 2016/05/26 05:01:11 ozaki-r Exp $ */
/*-
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -41,7 +41,7 @@
__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $");
#endif
#ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.119 2016/04/08 14:52:56 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.120 2016/05/26 05:01:11 ozaki-r Exp $");
#endif
/*
@@ -1399,7 +1399,7 @@
* tags which we consider too expensive to use)
* to pass it along.
*/
- ni = (struct ieee80211_node *) m->m_pkthdr.rcvif;
+ ni = M_GETCTX(m, struct ieee80211_node *);
m->m_pkthdr.rcvif = NULL;
wh = mtod(m, struct ieee80211_frame *);
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/athn.c
--- a/sys/dev/ic/athn.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/athn.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: athn.c,v 1.12 2015/11/17 16:37:22 jakllsch Exp $ */
+/* $NetBSD: athn.c,v 1.13 2016/05/26 05:01:12 ozaki-r Exp $ */
/* $OpenBSD: athn.c,v 1.83 2014/07/22 13:12:11 mpi Exp $ */
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.12 2015/11/17 16:37:22 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.13 2016/05/26 05:01:12 ozaki-r Exp $");
#ifndef _MODULE
#include "athn_usb.h" /* for NATHN_USB */
@@ -2623,7 +2623,7 @@
/* Send pending management frames first. */
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m != NULL) {
- ni = (void *)m->m_pkthdr.rcvif;
+ ni = M_GETCTX(m, struct ieee80211_node *);
goto sendit;
}
if (ic->ic_state != IEEE80211_S_RUN)
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/atw.c
--- a/sys/dev/ic/atw.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/atw.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atw.c,v 1.157 2016/01/26 16:00:12 christos Exp $ */
+/* $NetBSD: atw.c,v 1.158 2016/05/26 05:01:12 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.157 2016/01/26 16:00:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.158 2016/05/26 05:01:12 ozaki-r Exp $");
#include <sys/param.h>
@@ -3491,7 +3491,7 @@
*/
IF_DEQUEUE(&ic->ic_mgtq, m0);
if (m0 != NULL) {
- ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif;
+ ni = M_GETCTX(m0, struct ieee80211_node *);
m0->m_pkthdr.rcvif = NULL;
} else if (ic->ic_state != IEEE80211_S_RUN)
break; /* send no data until associated */
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/awi.c
--- a/sys/dev/ic/awi.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/awi.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awi.c,v 1.88 2012/10/27 17:18:19 chs Exp $ */
+/* $NetBSD: awi.c,v 1.89 2016/05/26 05:01:12 ozaki-r Exp $ */
/*-
* Copyright (c) 1999,2000,2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.88 2012/10/27 17:18:19 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.89 2016/05/26 05:01:12 ozaki-r Exp $");
#include "opt_inet.h"
@@ -668,7 +668,7 @@
break;
}
IF_DEQUEUE(&ic->ic_mgtq, m0);
- ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif;
+ ni = M_GETCTX(m0, struct ieee80211_node *);
} else {
if (ic->ic_state != IEEE80211_S_RUN)
break;
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/bwi.c
--- a/sys/dev/ic/bwi.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/bwi.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bwi.c,v 1.27 2016/03/02 19:26:15 christos Exp $ */
+/* $NetBSD: bwi.c,v 1.28 2016/05/26 05:01:12 ozaki-r 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.27 2016/03/02 19:26:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bwi.c,v 1.28 2016/05/26 05:01:12 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@@ -7365,7 +7365,7 @@
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m != NULL) {
- ni = (struct ieee80211_node *)m->m_pkthdr.rcvif;
+ ni = M_GETCTX(m, struct ieee80211_node *);
m->m_pkthdr.rcvif = NULL;
mgt_pkt = 1;
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/malo.c
--- a/sys/dev/ic/malo.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/malo.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: malo.c,v 1.5 2016/03/11 22:39:01 macallan Exp $ */
+/* $NetBSD: malo.c,v 1.6 2016/05/26 05:01:12 ozaki-r Exp $ */
/* $OpenBSD: malo.c,v 1.92 2010/08/27 17:08:00 jsg Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.5 2016/03/11 22:39:01 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.6 2016/05/26 05:01:12 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -997,7 +997,7 @@
}
IF_DEQUEUE(&ic->ic_mgtq, m0);
- ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif;
+ ni = M_GETCTX(m0, struct ieee80211_node *);
m0->m_pkthdr.rcvif = NULL;
bpf_mtap3(ic->ic_rawbpf, m0);
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/rt2560.c
--- a/sys/dev/ic/rt2560.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/rt2560.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rt2560.c,v 1.25 2012/02/18 13:38:35 drochner Exp $ */
+/* $NetBSD: rt2560.c,v 1.26 2016/05/26 05:01:12 ozaki-r 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.25 2012/02/18 13:38:35 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2560.c,v 1.26 2016/05/26 05:01:12 ozaki-r Exp $");
#include <sys/param.h>
@@ -2072,7 +2072,7 @@
if (m0 == NULL)
break;
- ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif;
+ ni = M_GETCTX(m0, struct ieee80211_node *);
m0->m_pkthdr.rcvif = NULL;
bpf_mtap3(ic->ic_rawbpf, m0);
if (rt2560_tx_mgt(sc, m0, ni) != 0)
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/rt2661.c
--- a/sys/dev/ic/rt2661.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/rt2661.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rt2661.c,v 1.30 2015/01/07 07:05:48 ozaki-r Exp $ */
+/* $NetBSD: rt2661.c,v 1.31 2016/05/26 05:01:12 ozaki-r 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.30 2015/01/07 07:05:48 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.31 2016/05/26 05:01:12 ozaki-r Exp $");
#include <sys/param.h>
@@ -1806,7 +1806,7 @@
if (m0 == NULL)
break;
- ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif;
+ ni = M_GETCTX(m0, struct ieee80211_node *);
m0->m_pkthdr.rcvif = NULL;
bpf_mtap3(ic->ic_rawbpf, m0);
if (rt2661_tx_mgt(sc, m0, ni) != 0)
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/rt2860.c
--- a/sys/dev/ic/rt2860.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/rt2860.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rt2860.c,v 1.8 2016/05/06 18:07:17 christos Exp $ */
+/* $NetBSD: rt2860.c,v 1.9 2016/05/26 05:01:12 ozaki-r Exp $ */
/* $OpenBSD: rt2860.c,v 1.90 2016/04/13 10:49:26 mpi Exp $ */
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.8 2016/05/06 18:07:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rt2860.c,v 1.9 2016/05/26 05:01:12 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/sockio.h>
@@ -1733,7 +1733,7 @@
/* send pending management frames first */
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m != NULL) {
- ni = (void *)m->m_pkthdr.rcvif;
+ ni = M_GETCTX(m, struct ieee80211_node *);
m->m_pkthdr.rcvif = NULL;
goto sendit;
}
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/ic/wi.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wi.c,v 1.237 2014/02/25 18:30:09 pooka Exp $ */
+/* $NetBSD: wi.c,v 1.238 2016/05/26 05:01:12 ozaki-r Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.237 2014/02/25 18:30:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.238 2016/05/26 05:01:12 ozaki-r Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -1106,7 +1106,7 @@
(void *)&frmhdr.wi_ehdr);
frmhdr.wi_ehdr.ether_type = 0;
wh = mtod(m0, struct ieee80211_frame *);
- ni = (struct ieee80211_node *)m0->m_pkthdr.rcvif;
+ ni = M_GETCTX(m0, struct ieee80211_node *);
m0->m_pkthdr.rcvif = NULL;
} else if (ic->ic_state == IEEE80211_S_RUN) {
IFQ_POLL(&ifp->if_snd, m0);
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/pci/if_iwm.c Thu May 26 05:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwm.c,v 1.40 2016/02/09 08:32:11 ozaki-r Exp $ */
+/* $NetBSD: if_iwm.c,v 1.41 2016/05/26 05:01:12 ozaki-r Exp $ */
/* OpenBSD: if_iwm.c,v 1.41 2015/05/22 06:50:54 kettenis Exp */
/*
@@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.40 2016/02/09 08:32:11 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.41 2016/05/26 05:01:12 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -5793,7 +5793,7 @@
/* need to send management frames even if we're not RUNning */
IF_DEQUEUE(&ic->ic_mgtq, m);
if (m) {
- ni = (void *)m->m_pkthdr.rcvif;
+ ni = M_GETCTX(m, struct ieee80211_node *);
ac = 0;
goto sendit;
}
diff -r 2bc5caf363d1 -r 414f8a99567a sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Thu May 26 04:26:05 2016 +0000
+++ b/sys/dev/pci/if_iwn.c Thu May 26 05:01:11 2016 +0000
Home |
Main Index |
Thread Index |
Old Index