Source-Changes-HG archive

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

[.joined/src/trunk]: .joined/src/sys/net/lagg sys: Use if_init wrapper function.



details:   https://anonhg.NetBSD.org/.joined/src/rev/7b4a858c7791
branches:  trunk
changeset: 359343:7b4a858c7791
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Dec 31 14:25:22 2021 +0000

description:
sys: Use if_init wrapper function.

Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.

diffstat:

 sys/arch/arm/imx/if_enet.c          |   6 +++---
 sys/arch/arm/sociox/if_ave.c        |   6 +++---
 sys/arch/arm/sociox/if_scx.c        |   6 +++---
 sys/arch/arm/sunxi/sunxi_emac.c     |   6 +++---
 sys/arch/arm/xscale/ixp425_if_npe.c |   8 ++++----
 sys/dev/cadence/if_cemac.c          |   6 +++---
 sys/dev/ic/bcmgenet.c               |   6 +++---
 sys/dev/ic/dm9000.c                 |   4 ++--
 sys/dev/ic/rtl8169.c                |   6 +++---
 sys/dev/pci/if_dge.c                |   8 ++++----
 sys/dev/pci/if_iwn.c                |   6 +++---
 sys/dev/pci/if_kse.c                |   6 +++---
 sys/dev/pci/if_sip.c                |   6 +++---
 sys/dev/pci/if_wm.c                 |   6 +++---
 sys/dev/pci/ixgbe/ixgbe.c           |   8 ++++----
 sys/dev/usb/if_urtw.c               |  10 +++++-----
 sys/net/agr/if_agr.c                |   6 +++---
 sys/net/if_bridge.c                 |   6 +++---
 sys/net/if_ethersubr.c              |  14 +++++++-------
 sys/net/if_ieee1394subr.c           |   8 ++++----
 sys/net/if_wg.c                     |   8 ++++----
 sys/net/lagg/if_lagg.c              |  16 ++++++++--------
 sys/net/link_proto.c                |   6 +++---
 23 files changed, 84 insertions(+), 84 deletions(-)

diffs (truncated from 749 to 300 lines):

diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/arch/arm/imx/if_enet.c
--- a/sys/arch/arm/imx/if_enet.c        Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/arch/arm/imx/if_enet.c        Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_enet.c,v 1.33 2020/12/31 02:16:14 uwe Exp $ */
+/*     $NetBSD: if_enet.c,v 1.34 2021/12/31 14:25:22 riastradh Exp $   */
 
 /*
  * Copyright (c) 2014 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.33 2020/12/31 02:16:14 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_enet.c,v 1.34 2021/12/31 14:25:22 riastradh Exp $");
 
 #include "vlan.h"
 
@@ -1027,7 +1027,7 @@
                error = 0;
                switch (command) {
                case SIOCSIFCAP:
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                        break;
                case SIOCADDMULTI:
                case SIOCDELMULTI:
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/arch/arm/sociox/if_ave.c
--- a/sys/arch/arm/sociox/if_ave.c      Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/arch/arm/sociox/if_ave.c      Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ave.c,v 1.21 2021/01/27 03:10:19 thorpej Exp $      */
+/*     $NetBSD: if_ave.c,v 1.22 2021/12/31 14:25:22 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.21 2021/01/27 03:10:19 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ave.c,v 1.22 2021/12/31 14:25:22 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -790,7 +790,7 @@
                error = 0;
 
                if (cmd == SIOCSIFCAP)
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
                        ;
                else if (ifp->if_flags & IFF_RUNNING) {
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/arch/arm/sociox/if_scx.c
--- a/sys/arch/arm/sociox/if_scx.c      Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/arch/arm/sociox/if_scx.c      Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_scx.c,v 1.33 2021/12/21 21:30:49 nisimura Exp $     */
+/*     $NetBSD: if_scx.c,v 1.34 2021/12/31 14:25:22 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -46,7 +46,7 @@
 #define NOT_MP_SAFE    0
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.33 2021/12/21 21:30:49 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_scx.c,v 1.34 2021/12/31 14:25:22 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -1201,7 +1201,7 @@
                        break;
                error = 0;
                if (cmd == SIOCSIFCAP)
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
                        ;
                else if (ifp->if_flags & IFF_RUNNING) {
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/arch/arm/sunxi/sunxi_emac.c
--- a/sys/arch/arm/sunxi/sunxi_emac.c   Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/arch/arm/sunxi/sunxi_emac.c   Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_emac.c,v 1.34 2021/11/07 19:21:33 jmcneill Exp $ */
+/* $NetBSD: sunxi_emac.c,v 1.35 2021/12/31 14:25:22 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2016-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
 #include "opt_net_mpsafe.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.34 2021/11/07 19:21:33 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_emac.c,v 1.35 2021/12/31 14:25:22 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -932,7 +932,7 @@
                error = 0;
 
                if (cmd == SIOCSIFCAP)
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                else if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
                        ;
                else if ((ifp->if_flags & IFF_RUNNING) != 0) {
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/arch/arm/xscale/ixp425_if_npe.c
--- a/sys/arch/arm/xscale/ixp425_if_npe.c       Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/arch/arm/xscale/ixp425_if_npe.c       Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ixp425_if_npe.c,v 1.49 2021/12/31 14:24:38 riastradh Exp $ */
+/*     $NetBSD: ixp425_if_npe.c,v 1.50 2021/12/31 14:25:22 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2006 Sam Leffler.  All rights reserved.
@@ -28,7 +28,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.49 2021/12/31 14:24:38 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.50 2021/12/31 14:25:22 riastradh Exp $");
 
 /*
  * Intel XScale NPE Ethernet driver.
@@ -1435,7 +1435,7 @@
                         * If interface is marked up and it is stopped, then
                         * start it.
                         */
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                } else if ((ifp->if_flags & IFF_UP) != 0) {
                        u_short diff;
 
@@ -1457,7 +1457,7 @@
                                 * any other flags that affect the hardware
                                 * state.
                                 */
-                               error = (*ifp->if_init)(ifp);
+                               error = if_init(ifp);
                        }
                }
                sc->sc_if_flags = ifp->if_flags;
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/dev/cadence/if_cemac.c
--- a/sys/dev/cadence/if_cemac.c        Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/dev/cadence/if_cemac.c        Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cemac.c,v 1.23 2020/06/28 12:43:00 skrll Exp $      */
+/*     $NetBSD: if_cemac.c,v 1.24 2021/12/31 14:25:22 riastradh Exp $  */
 
 /*
  * Copyright (c) 2015  Genetec Corporation.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cemac.c,v 1.23 2020/06/28 12:43:00 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cemac.c,v 1.24 2021/12/31 14:25:22 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -759,7 +759,7 @@
                error = 0;
 
                if (cmd == SIOCSIFCAP) {
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                } else if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
                        ;
                else if (ifp->if_flags & IFF_RUNNING) {
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/dev/ic/bcmgenet.c
--- a/sys/dev/ic/bcmgenet.c     Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/dev/ic/bcmgenet.c     Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcmgenet.c,v 1.10 2021/08/10 15:28:44 jmcneill Exp $ */
+/* $NetBSD: bcmgenet.c,v 1.11 2021/12/31 14:25:22 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2020 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -34,7 +34,7 @@
 #include "opt_ddb.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.10 2021/08/10 15:28:44 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcmgenet.c,v 1.11 2021/12/31 14:25:22 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -916,7 +916,7 @@
                error = 0;
 
                if (cmd == SIOCSIFCAP)
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                else if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
                        ;
                else if ((ifp->if_flags & IFF_RUNNING) != 0) {
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/dev/ic/dm9000.c
--- a/sys/dev/ic/dm9000.c       Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/dev/ic/dm9000.c       Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dm9000.c,v 1.32 2021/12/05 07:26:35 msaitoh Exp $      */
+/*     $NetBSD: dm9000.c,v 1.33 2021/12/31 14:25:22 riastradh Exp $    */
 
 /*
  * Copyright (c) 2009 Paul Fleischer
@@ -833,7 +833,7 @@
                        break;
                error = 0;
                if (cmd == SIOCSIFCAP)
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                else if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
                        ;
                else if (ifp->if_flags && IFF_RUNNING) {
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/dev/ic/rtl8169.c
--- a/sys/dev/ic/rtl8169.c      Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/dev/ic/rtl8169.c      Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl8169.c,v 1.168 2021/09/04 19:27:43 jakllsch Exp $   */
+/*     $NetBSD: rtl8169.c,v 1.169 2021/12/31 14:25:22 riastradh Exp $  */
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.168 2021/09/04 19:27:43 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.169 2021/12/31 14:25:22 riastradh Exp $");
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -2130,7 +2130,7 @@
                error = 0;
 
                if (command == SIOCSIFCAP)
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                else if (command != SIOCADDMULTI && command != SIOCDELMULTI)
                        ;
                else if (ifp->if_flags & IFF_RUNNING)
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/dev/pci/if_dge.c
--- a/sys/dev/pci/if_dge.c      Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/dev/pci/if_dge.c      Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_dge.c,v 1.62 2021/12/05 04:32:36 msaitoh Exp $ */
+/*     $NetBSD: if_dge.c,v 1.63 2021/12/31 14:25:23 riastradh Exp $ */
 
 /*
  * Copyright (c) 2004, SUNET, Swedish University Computer Network.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.62 2021/12/05 04:32:36 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dge.c,v 1.63 2021/12/31 14:25:23 riastradh Exp $");
 
 
 
@@ -1453,7 +1453,7 @@
                else if ((error = ifioctl_common(ifp, cmd, data)) != ENETRESET)
                        break;
                else if (ifp->if_flags & IFF_UP)
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                else
                        error = 0;
                break;
@@ -1488,7 +1488,7 @@
                error = 0;
 
                if (cmd == SIOCSIFCAP)
-                       error = (*ifp->if_init)(ifp);
+                       error = if_init(ifp);
                else if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
                        ;
                else if (ifp->if_flags & IFF_RUNNING) {
diff -r 0ecb11d420d5 -r 7b4a858c7791 sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c      Fri Dec 31 14:24:50 2021 +0000
+++ b/sys/dev/pci/if_iwn.c      Fri Dec 31 14:25:22 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwn.c,v 1.97 2021/09/19 11:37:01 andvar Exp $       */
+/*     $NetBSD: if_iwn.c,v 1.98 2021/12/31 14:25:23 riastradh Exp $    */
 /*     $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $     */
 
 /*-
@@ -22,7 +22,7 @@
  * adapters.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.97 2021/09/19 11:37:01 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.98 2021/12/31 14:25:23 riastradh Exp $");
 
 #define IWN_USE_RBUF   /* Use local storage for RX */
 #undef IWN_HWCRYPTO    /* XXX does not even compile yet */
@@ -973,7 +973,7 @@
        s = splnet();
        ifp = &sc->sc_ic.ic_if;



Home | Main Index | Thread Index | Old Index