Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/670fc0b5e8bd
branches:  trunk
changeset: 457749:670fc0b5e8bd
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Jul 17 03:09:16 2019 +0000

description:
KNF. No functional change.

diffstat:

 sbin/ifconfig/ether.c   |  10 +++++-----
 sys/dev/pci/ixgbe/ixv.c |   3 +--
 sys/net/if_ether.h      |  23 ++++++++++++-----------
 sys/net/if_vlan.c       |   9 ++++-----
 4 files changed, 22 insertions(+), 23 deletions(-)

diffs (152 lines):

diff -r c33c428196a1 -r 670fc0b5e8bd sbin/ifconfig/ether.c
--- a/sbin/ifconfig/ether.c     Tue Jul 16 22:57:55 2019 +0000
+++ b/sbin/ifconfig/ether.c     Wed Jul 17 03:09:16 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ether.c,v 1.4 2019/07/08 03:04:15 msaitoh Exp $        */
+/*     $NetBSD: ether.c,v 1.5 2019/07/17 03:09:16 msaitoh Exp $        */
 
 /*
  * Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ether.c,v 1.4 2019/07/08 03:04:15 msaitoh Exp $");
+__RCSID("$NetBSD: ether.c,v 1.5 2019/07/17 03:09:16 msaitoh Exp $");
 #endif /* not lint */
 
 #include <sys/param.h> 
@@ -65,10 +65,10 @@
 
 static const struct kwinst ethercapskw[] = {
 #if 0 /* notyet */
-         IFKW("vlan-hwfilter", ETHERCAP_VLAN_HWFILTER)
+       IFKW("vlan-hwfilter",   ETHERCAP_VLAN_HWFILTER),
 #endif
-         IFKW("vlan-hwtagging", ETHERCAP_VLAN_HWTAGGING),
-         IFKW("eee",           ETHERCAP_EEE)
+       IFKW("vlan-hwtagging",  ETHERCAP_VLAN_HWTAGGING),
+       IFKW("eee",             ETHERCAP_EEE)
 };
 
 struct pkw ethercaps = PKW_INITIALIZER(&ethercaps, "ethercaps", setethercaps,
diff -r c33c428196a1 -r 670fc0b5e8bd sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Tue Jul 16 22:57:55 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Wed Jul 17 03:09:16 2019 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.118 2019/07/04 09:02:24 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.119 2019/07/17 03:09:16 msaitoh Exp $*/
 
 /******************************************************************************
 
@@ -132,7 +132,6 @@
 static void    ixv_update_stats(struct adapter *);
 static void    ixv_add_stats_sysctls(struct adapter *);
 
-
 /* Sysctl handlers */
 static void    ixv_set_sysctl_value(struct adapter *, const char *,
                    const char *, int *, int);
diff -r c33c428196a1 -r 670fc0b5e8bd sys/net/if_ether.h
--- a/sys/net/if_ether.h        Tue Jul 16 22:57:55 2019 +0000
+++ b/sys/net/if_ether.h        Wed Jul 17 03:09:16 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ether.h,v 1.79 2019/05/29 10:07:30 msaitoh Exp $    */
+/*     $NetBSD: if_ether.h,v 1.80 2019/07/17 03:09:16 msaitoh Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -59,7 +59,7 @@
 /*
  * Some Ethernet extensions.
  */
-#define        ETHER_VLAN_ENCAP_LEN    4      /* length of 802.1Q VLAN encapsulation */
+#define        ETHER_VLAN_ENCAP_LEN    4     /* length of 802.1Q VLAN encapsulation */
 #define        EVL_VLANOFTAG(tag)      ((tag) & 4095)          /* VLAN ID */
 #define        EVL_PRIOFTAG(tag)       (((tag) >> 13) & 7)     /* Priority */
 #define        EVL_CFIOFTAG(tag)       (((tag) >> 12) & 1)     /* CFI */
@@ -184,7 +184,8 @@
        /* The device handle for the MII bus child device. */
        struct mii_data                         *ec_mii;
        struct ifmedia                          *ec_ifmedia;
-       /* Called after a change to ec_if.if_flags.  Returns
+       /*
+        * Called after a change to ec_if.if_flags.  Returns
         * ENETRESET if the device should be reinitialized with
         * ec_if.if_init, 0 on success, not 0 on failure.
         */
@@ -255,7 +256,7 @@
 struct ether_multi {
        uint8_t enm_addrlo[ETHER_ADDR_LEN]; /* low  or only address of range */
        uint8_t enm_addrhi[ETHER_ADDR_LEN]; /* high or only address of range */
-       u_int    enm_refcount;          /* no. claims to this addr/range */
+       u_int   enm_refcount;           /* no. claims to this addr/range */
        LIST_ENTRY(ether_multi) enm_list;
 };
 
@@ -308,9 +309,9 @@
 
        return enm;
 }
-#define ETHER_NEXT_MULTI(step, enm) \
-       /* struct ether_multistep step; */  \
-       /* struct ether_multi *enm; */  \
+#define ETHER_NEXT_MULTI(step, enm)            \
+       /* struct ether_multistep step; */      \
+       /* struct ether_multi *enm; */          \
        (enm) = ether_next_multi(&(step))
 
 static __inline struct ether_multi *
@@ -322,10 +323,10 @@
        return ether_next_multi(step);
 }
 
-#define ETHER_FIRST_MULTI(step, ec, enm) \
-       /* struct ether_multistep step; */ \
-       /* struct ethercom *ec; */ \
-       /* struct ether_multi *enm; */ \
+#define ETHER_FIRST_MULTI(step, ec, enm)               \
+       /* struct ether_multistep step; */              \
+       /* struct ethercom *ec; */                      \
+       /* struct ether_multi *enm; */                  \
        (enm) = ether_first_multi(&(step), (ec))
 
 #define ETHER_LOCK(ec)         mutex_enter((ec)->ec_lock)
diff -r c33c428196a1 -r 670fc0b5e8bd sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Tue Jul 16 22:57:55 2019 +0000
+++ b/sys/net/if_vlan.c Wed Jul 17 03:09:16 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_vlan.c,v 1.139 2019/07/09 08:46:58 msaitoh Exp $    */
+/*     $NetBSD: if_vlan.c,v 1.140 2019/07/17 03:09:16 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.139 2019/07/09 08:46:58 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.140 2019/07/17 03:09:16 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -620,7 +620,7 @@
                struct ethercom *ec = (void *)p;
                if (--ec->ec_nvlans == 0) {
                        IFNET_LOCK(p);
-                       (void) ether_disable_vlan_mtu(p);
+                       (void)ether_disable_vlan_mtu(p);
                        IFNET_UNLOCK(p);
                }
 
@@ -1000,9 +1000,8 @@
                        break;
                }
                error = vlan_config(ifv, pr, vlr.vlr_tag);
-               if (error != 0) {
+               if (error != 0)
                        break;
-               }
 
                /* Update promiscuous mode, if necessary. */
                vlan_set_promisc(ifp);



Home | Main Index | Thread Index | Old Index