Module Name: src Committed By: msaitoh Date: Wed Jul 17 03:09:16 UTC 2019
Modified Files: src/sbin/ifconfig: ether.c src/sys/dev/pci/ixgbe: ixv.c src/sys/net: if_ether.h if_vlan.c Log Message: KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sbin/ifconfig/ether.c cvs rdiff -u -r1.118 -r1.119 src/sys/dev/pci/ixgbe/ixv.c cvs rdiff -u -r1.79 -r1.80 src/sys/net/if_ether.h cvs rdiff -u -r1.139 -r1.140 src/sys/net/if_vlan.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/ifconfig/ether.c diff -u src/sbin/ifconfig/ether.c:1.4 src/sbin/ifconfig/ether.c:1.5 --- src/sbin/ifconfig/ether.c:1.4 Mon Jul 8 03:04:15 2019 +++ src/sbin/ifconfig/ether.c Wed Jul 17 03:09:16 2019 @@ -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 cmdloop_branch_t branch; 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(ðercaps, "ethercaps", setethercaps, Index: src/sys/dev/pci/ixgbe/ixv.c diff -u src/sys/dev/pci/ixgbe/ixv.c:1.118 src/sys/dev/pci/ixgbe/ixv.c:1.119 --- src/sys/dev/pci/ixgbe/ixv.c:1.118 Thu Jul 4 09:02:24 2019 +++ src/sys/dev/pci/ixgbe/ixv.c Wed Jul 17 03:09:16 2019 @@ -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_init_stats(struct adapte 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); Index: src/sys/net/if_ether.h diff -u src/sys/net/if_ether.h:1.79 src/sys/net/if_ether.h:1.80 --- src/sys/net/if_ether.h:1.79 Wed May 29 10:07:30 2019 +++ src/sys/net/if_ether.h Wed Jul 17 03:09:16 2019 @@ -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 @@ struct ethercom { /* 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 @@ void ether_input(struct ifnet *, stru 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 @@ ether_next_multi(struct ether_multistep 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 @@ ether_first_multi(struct ether_multistep 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) Index: src/sys/net/if_vlan.c diff -u src/sys/net/if_vlan.c:1.139 src/sys/net/if_vlan.c:1.140 --- src/sys/net/if_vlan.c:1.139 Tue Jul 9 08:46:58 2019 +++ src/sys/net/if_vlan.c Wed Jul 17 03:09:16 2019 @@ -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 @@ vlan_unconfig_locked(struct ifvlan *ifv, 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 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd 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);