Source-Changes-HG archive

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

[src/trunk]: src/sys/net Remove dead codes and make if_free_sadl static



details:   https://anonhg.NetBSD.org/src/rev/c6485c2f2772
branches:  trunk
changeset: 334043:c6485c2f2772
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Nov 28 08:29:00 2014 +0000

description:
Remove dead codes and make if_free_sadl static

No functional change.

diffstat:

 sys/net/if.c              |  10 +++++-----
 sys/net/if.h              |   3 +--
 sys/net/if_ethersubr.c    |   8 ++------
 sys/net/if_ieee1394subr.c |   7 ++-----
 sys/net/if_spppsubr.c     |   8 ++------
 sys/net/if_tokensubr.c    |   7 ++-----
 6 files changed, 14 insertions(+), 29 deletions(-)

diffs (168 lines):

diff -r 65d43488abd5 -r c6485c2f2772 sys/net/if.c
--- a/sys/net/if.c      Fri Nov 28 08:27:27 2014 +0000
+++ b/sys/net/if.c      Fri Nov 28 08:29:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.299 2014/11/27 03:15:51 ozaki-r Exp $ */
+/*     $NetBSD: if.c,v 1.300 2014/11/28 08:29:00 ozaki-r Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.299 2014/11/27 03:15:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.300 2014/11/28 08:29:00 ozaki-r Exp $");
 
 #include "opt_inet.h"
 
@@ -193,6 +193,7 @@
 static void sysctl_sndq_setup(struct sysctllog **, const char *,
     struct ifaltq *);
 static void if_slowtimo(void *);
+static void if_free_sadl(struct ifnet *);
 
 #if defined(INET) || defined(INET6)
 static void sysctl_net_pktq_setup(struct sysctllog **, int);
@@ -468,10 +469,9 @@
 
 /*
  * Free the link level name for the specified interface.  This is
- * a detach helper.  This is called from if_detach() or from
- * link layer type specific detach functions.
+ * a detach helper.  This is called from if_detach().
  */
-void
+static void
 if_free_sadl(struct ifnet *ifp)
 {
        struct ifaddr *ifa;
diff -r 65d43488abd5 -r c6485c2f2772 sys/net/if.h
--- a/sys/net/if.h      Fri Nov 28 08:27:27 2014 +0000
+++ b/sys/net/if.h      Fri Nov 28 08:29:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.180 2014/11/27 03:15:51 ozaki-r Exp $ */
+/*     $NetBSD: if.h,v 1.181 2014/11/28 08:29:00 ozaki-r Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -864,7 +864,6 @@
     const struct sockaddr_dl *);
 void   if_set_sadl(struct ifnet *, const void *, u_char, bool);
 void   if_alloc_sadl(struct ifnet *);
-void   if_free_sadl(struct ifnet *);
 void   if_attach(struct ifnet *);
 void   if_attachdomain(void);
 void   if_attachdomain1(struct ifnet *);
diff -r 65d43488abd5 -r c6485c2f2772 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Fri Nov 28 08:27:27 2014 +0000
+++ b/sys/net/if_ethersubr.c    Fri Nov 28 08:29:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.204 2014/08/10 16:44:36 tls Exp $   */
+/*     $NetBSD: if_ethersubr.c,v 1.205 2014/11/28 08:29:00 ozaki-r Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.204 2014/08/10 16:44:36 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.205 2014/11/28 08:29:00 ozaki-r Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -1048,10 +1048,6 @@
        }
        splx(s);
 
-#if 0  /* done in if_detach() */
-       if_free_sadl(ifp);
-#endif
-
        ifp->if_mowner = NULL;
        MOWNER_DETACH(&ec->ec_rx_mowner);
        MOWNER_DETACH(&ec->ec_tx_mowner);
diff -r 65d43488abd5 -r c6485c2f2772 sys/net/if_ieee1394subr.c
--- a/sys/net/if_ieee1394subr.c Fri Nov 28 08:27:27 2014 +0000
+++ b/sys/net/if_ieee1394subr.c Fri Nov 28 08:29:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ieee1394subr.c,v 1.47 2014/06/05 23:48:16 rmind Exp $       */
+/*     $NetBSD: if_ieee1394subr.c,v 1.48 2014/11/28 08:29:00 ozaki-r Exp $     */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.47 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ieee1394subr.c,v 1.48 2014/11/28 08:29:00 ozaki-r Exp $");
 
 #include "opt_inet.h"
 
@@ -707,9 +707,6 @@
        bpf_detach(ifp);
        free(__UNCONST(ifp->if_broadcastaddr), M_DEVBUF);
        ifp->if_broadcastaddr = NULL;
-#if 0  /* done in if_detach() */
-       if_free_sadl(ifp);
-#endif
 }
 
 int
diff -r 65d43488abd5 -r c6485c2f2772 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Fri Nov 28 08:27:27 2014 +0000
+++ b/sys/net/if_spppsubr.c     Fri Nov 28 08:29:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.130 2014/06/06 22:15:32 rmind Exp $   */
+/*     $NetBSD: if_spppsubr.c,v 1.131 2014/11/28 08:29:00 ozaki-r Exp $         */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.130 2014/06/06 22:15:32 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.131 2014/11/28 08:29:00 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -950,10 +950,6 @@
        if (sp->myauth.secret) free(sp->myauth.secret, M_DEVBUF);
        if (sp->hisauth.name) free(sp->hisauth.name, M_DEVBUF);
        if (sp->hisauth.secret) free(sp->hisauth.secret, M_DEVBUF);
-
-#if 0  /* done in if_detach() */
-       if_free_sadl(ifp);
-#endif
 }
 
 /*
diff -r 65d43488abd5 -r c6485c2f2772 sys/net/if_tokensubr.c
--- a/sys/net/if_tokensubr.c    Fri Nov 28 08:27:27 2014 +0000
+++ b/sys/net/if_tokensubr.c    Fri Nov 28 08:29:00 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tokensubr.c,v 1.65 2014/06/05 23:48:16 rmind Exp $  */
+/*     $NetBSD: if_tokensubr.c,v 1.66 2014/11/28 08:29:00 ozaki-r Exp $        */
 
 /*
  * Copyright (c) 1982, 1989, 1993
@@ -92,7 +92,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tokensubr.c,v 1.65 2014/06/05 23:48:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tokensubr.c,v 1.66 2014/11/28 08:29:00 ozaki-r Exp $");
 
 #include "opt_inet.h"
 #include "opt_atalk.h"
@@ -554,7 +554,4 @@
 {
 
        bpf_detach(ifp);
-#if 0  /* done in if_detach() */
-       if_free_sadl(ifp);
-#endif
 }



Home | Main Index | Thread Index | Old Index