Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net KNF. No functional change.



details:   https://anonhg.NetBSD.org/src/rev/bab3ec752bfc
branches:  trunk
changeset: 452094:bab3ec752bfc
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Jun 18 08:36:52 2019 +0000

description:
KNF. No functional change.

diffstat:

 sys/net/if_vlan.c |  42 +++++++++++++++++++-----------------------
 1 files changed, 19 insertions(+), 23 deletions(-)

diffs (121 lines):

diff -r c88284833934 -r bab3ec752bfc sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Tue Jun 18 07:50:43 2019 +0000
+++ b/sys/net/if_vlan.c Tue Jun 18 08:36:52 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vlan.c,v 1.136 2019/05/15 02:59:18 ozaki-r Exp $    */
+/*     $NetBSD: if_vlan.c,v 1.137 2019/06/18 08:36:52 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.136 2019/05/15 02:59:18 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.137 2019/06/18 08:36:52 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -147,7 +147,7 @@
        int     ifvm_mintu;     /* min transmission unit */
        uint16_t ifvm_proto;    /* encapsulation ethertype */
        uint16_t ifvm_tag;      /* tag to apply on packets */
-       struct ifnet *ifvm_p;           /* parent interface of this vlan */
+       struct ifnet *ifvm_p;   /* parent interface of this vlan */
 
        struct psref_target ifvm_psref;
 };
@@ -199,23 +199,19 @@
 
 static int     vlan_clone_create(struct if_clone *, int);
 static int     vlan_clone_destroy(struct ifnet *);
-static int     vlan_config(struct ifvlan *, struct ifnet *,
-    uint16_t);
+static int     vlan_config(struct ifvlan *, struct ifnet *, uint16_t);
 static int     vlan_ioctl(struct ifnet *, u_long, void *);
 static void    vlan_start(struct ifnet *);
 static int     vlan_transmit(struct ifnet *, struct mbuf *);
 static void    vlan_unconfig(struct ifnet *);
-static int     vlan_unconfig_locked(struct ifvlan *,
-    struct ifvlan_linkmib *);
+static int     vlan_unconfig_locked(struct ifvlan *, struct ifvlan_linkmib *);
 static void    vlan_hash_init(void);
 static int     vlan_hash_fini(void);
 static int     vlan_tag_hash(uint16_t, u_long);
 static struct ifvlan_linkmib*  vlan_getref_linkmib(struct ifvlan *,
     struct psref *);
-static void    vlan_putref_linkmib(struct ifvlan_linkmib *,
-    struct psref *);
-static void    vlan_linkmib_update(struct ifvlan *,
-    struct ifvlan_linkmib *);
+static void    vlan_putref_linkmib(struct ifvlan_linkmib *, struct psref *);
+static void    vlan_linkmib_update(struct ifvlan *, struct ifvlan_linkmib *);
 static struct ifvlan_linkmib*  vlan_lookup_tag_psref(struct ifnet *,
     uint16_t, struct psref *);
 
@@ -348,7 +344,7 @@
        struct ifvlan_linkmib *mib;
        int rv;
 
-       ifv = malloc(sizeof(struct ifvlan), M_DEVBUF, M_WAITOK|M_ZERO);
+       ifv = malloc(sizeof(struct ifvlan), M_DEVBUF, M_WAITOK | M_ZERO);
        mib = kmem_zalloc(sizeof(struct ifvlan_linkmib), KM_SLEEP);
        ifp = &ifv->ifv_if;
        LIST_INIT(&ifv->ifv_mc_listhead);
@@ -508,11 +504,11 @@
                        ec->ec_capenable |= ETHERCAP_VLAN_HWTAGGING;
                        ifp->if_capabilities = p->if_capabilities &
                            (IFCAP_TSOv4 | IFCAP_TSOv6 |
-                            IFCAP_CSUM_IPv4_Tx|IFCAP_CSUM_IPv4_Rx|
-                            IFCAP_CSUM_TCPv4_Tx|IFCAP_CSUM_TCPv4_Rx|
-                            IFCAP_CSUM_UDPv4_Tx|IFCAP_CSUM_UDPv4_Rx|
-                            IFCAP_CSUM_TCPv6_Tx|IFCAP_CSUM_TCPv6_Rx|
-                            IFCAP_CSUM_UDPv6_Tx|IFCAP_CSUM_UDPv6_Rx);
+                               IFCAP_CSUM_IPv4_Tx  | IFCAP_CSUM_IPv4_Rx |
+                               IFCAP_CSUM_TCPv4_Tx | IFCAP_CSUM_TCPv4_Rx |
+                               IFCAP_CSUM_UDPv4_Tx | IFCAP_CSUM_UDPv4_Rx |
+                               IFCAP_CSUM_TCPv6_Tx | IFCAP_CSUM_TCPv6_Rx |
+                               IFCAP_CSUM_UDPv6_Tx | IFCAP_CSUM_UDPv6_Rx);
                }
 
                /*
@@ -598,7 +594,7 @@
        KASSERT(IFNET_LOCKED(ifp));
        KASSERT(mutex_owned(&ifv->ifv_lock));
 
-       ifp->if_flags &= ~(IFF_UP|IFF_RUNNING);
+       ifp->if_flags &= ~(IFF_UP | IFF_RUNNING);
 
        omib = ifv->ifv_mib;
        p = omib->ifvm_p;
@@ -613,7 +609,7 @@
        psref_target_init(nmib_psref, ifvm_psref_class);
 
        /*
-        * Since the interface is being unconfigured, we need to empty the
+        * Since the interface is being unconfigured, we need to empty the
         * list of multicast groups that we may have joined while we were
         * alive and remove them from the parent's list also.
         */
@@ -860,8 +856,8 @@
 
                /* XXX ifv_mib = NULL? */
                if (ifv->ifv_mib->ifvm_p == p) {
-                       KASSERTMSG(i < cnt, "no memory for unconfig, parent=%s",
-                           p->if_xname);
+                       KASSERTMSG(i < cnt,
+                           "no memory for unconfig, parent=%s", p->if_xname);
                        error = vlan_unconfig_locked(ifv, nmibs[i]);
                        if (!error) {
                                nmibs[i] = NULL;
@@ -1607,8 +1603,8 @@
        KASSERT(mib->ifvm_encaplen == ETHER_VLAN_ENCAP_LEN);
 
        ifv = mib->ifvm_ifvlan;
-       if ((ifv->ifv_if.if_flags & (IFF_UP|IFF_RUNNING)) !=
-           (IFF_UP|IFF_RUNNING)) {
+       if ((ifv->ifv_if.if_flags & (IFF_UP | IFF_RUNNING)) !=
+           (IFF_UP | IFF_RUNNING)) {
                m_freem(m);
                ifp->if_noproto++;
                goto out;



Home | Main Index | Thread Index | Old Index