Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Simplify "LIST_HEAD(); " to make the code more unders...
details: https://anonhg.NetBSD.org/src/rev/bf4b582c6a33
branches: trunk
changeset: 457440:bf4b582c6a33
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jun 25 12:30:50 2019 +0000
description:
Simplify "LIST_HEAD();" to make the code more understandable.
No functional change.
diffstat:
sys/net/if_gif.c | 7 +++----
sys/net/if_ipsec.c | 7 +++----
sys/net/if_l2tp.c | 7 +++----
sys/net/if_ppp.c | 7 +++----
sys/net/if_vlan.c | 7 +++----
5 files changed, 15 insertions(+), 20 deletions(-)
diffs (146 lines):
diff -r bace151d895e -r bf4b582c6a33 sys/net/if_gif.c
--- a/sys/net/if_gif.c Tue Jun 25 10:30:29 2019 +0000
+++ b/sys/net/if_gif.c Tue Jun 25 12:30:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gif.c,v 1.147 2019/06/18 07:50:43 msaitoh Exp $ */
+/* $NetBSD: if_gif.c,v 1.148 2019/06/25 12:30:50 msaitoh Exp $ */
/* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.147 2019/06/18 07:50:43 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.148 2019/06/25 12:30:50 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -97,9 +97,8 @@
/*
* gif global variable definitions
*/
-LIST_HEAD(gif_sclist, gif_softc);
static struct {
- struct gif_sclist list;
+ LIST_HEAD(gif_sclist, gif_softc) list;
kmutex_t lock;
} gif_softcs __cacheline_aligned;
diff -r bace151d895e -r bf4b582c6a33 sys/net/if_ipsec.c
--- a/sys/net/if_ipsec.c Tue Jun 25 10:30:29 2019 +0000
+++ b/sys/net/if_ipsec.c Tue Jun 25 12:30:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ipsec.c,v 1.21 2019/03/14 03:52:40 knakahara Exp $ */
+/* $NetBSD: if_ipsec.c,v 1.22 2019/06/25 12:30:50 msaitoh Exp $ */
/*
* Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.21 2019/03/14 03:52:40 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.22 2019/06/25 12:30:50 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -139,9 +139,8 @@
*/
/* This list is used in ioctl context only. */
-LIST_HEAD(ipsec_sclist, ipsec_softc);
static struct {
- struct ipsec_sclist list;
+ LIST_HEAD(ipsec_sclist, ipsec_softc) list;
kmutex_t lock;
} ipsec_softcs __cacheline_aligned;
diff -r bace151d895e -r bf4b582c6a33 sys/net/if_l2tp.c
--- a/sys/net/if_l2tp.c Tue Jun 25 10:30:29 2019 +0000
+++ b/sys/net/if_l2tp.c Tue Jun 25 12:30:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_l2tp.c,v 1.34 2019/04/26 11:51:56 pgoyette Exp $ */
+/* $NetBSD: if_l2tp.c,v 1.35 2019/06/25 12:30:50 msaitoh Exp $ */
/*
* Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.34 2019/04/26 11:51:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_l2tp.c,v 1.35 2019/06/25 12:30:50 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -95,9 +95,8 @@
/*
* l2tp global variable definitions
*/
-LIST_HEAD(l2tp_sclist, l2tp_softc);
static struct {
- struct l2tp_sclist list;
+ LIST_HEAD(l2tp_sclist, l2tp_softc) list;
kmutex_t lock;
} l2tp_softcs __cacheline_aligned;
diff -r bace151d895e -r bf4b582c6a33 sys/net/if_ppp.c
--- a/sys/net/if_ppp.c Tue Jun 25 10:30:29 2019 +0000
+++ b/sys/net/if_ppp.c Tue Jun 25 12:30:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ppp.c,v 1.164 2019/01/25 08:51:29 knakahara Exp $ */
+/* $NetBSD: if_ppp.c,v 1.165 2019/06/25 12:30:50 msaitoh Exp $ */
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
/*
@@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.164 2019/01/25 08:51:29 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ppp.c,v 1.165 2019/06/25 12:30:50 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "ppp.h"
@@ -206,9 +206,8 @@
static struct ppp_softc *ppp_create(const char *, int);
-LIST_HEAD(ppp_sclist, ppp_softc);
static struct {
- struct ppp_sclist list;
+ LIST_HEAD(ppp_sclist, ppp_softc) list;
kmutex_t lock;
} ppp_softcs __cacheline_aligned;
diff -r bace151d895e -r bf4b582c6a33 sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Tue Jun 25 10:30:29 2019 +0000
+++ b/sys/net/if_vlan.c Tue Jun 25 12:30:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vlan.c,v 1.137 2019/06/18 08:36:52 msaitoh Exp $ */
+/* $NetBSD: if_vlan.c,v 1.138 2019/06/25 12:30:50 msaitoh Exp $ */
/*
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.137 2019/06/18 08:36:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.138 2019/06/25 12:30:50 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -215,10 +215,9 @@
static struct ifvlan_linkmib* vlan_lookup_tag_psref(struct ifnet *,
uint16_t, struct psref *);
-LIST_HEAD(vlan_ifvlist, ifvlan);
static struct {
kmutex_t lock;
- struct vlan_ifvlist list;
+ LIST_HEAD(vlan_ifvlist, ifvlan) list;
} ifv_list __cacheline_aligned;
Home |
Main Index |
Thread Index |
Old Index