Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Dec 2011 23:26:28 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228380 - head/sys/net
Message-ID:  <201112092326.pB9NQSeT054313@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Dec  9 23:26:28 2011
New Revision: 228380
URL: http://svn.freebsd.org/changeset/base/228380

Log:
  Remove the unused if_free_type() function.
  
  X-MFC after:	never

Modified:
  head/sys/net/if.c
  head/sys/net/if_var.h

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c	Fri Dec  9 22:23:45 2011	(r228379)
+++ head/sys/net/if.c	Fri Dec  9 23:26:28 2011	(r228380)
@@ -494,19 +494,12 @@ if_free_internal(struct ifnet *ifp)
 }
 
 /*
- * This version should only be called by intefaces that switch their type
- * after calling if_alloc().  if_free_type() will go away again now that we
- * have if_alloctype to cache the original allocation type.  For now, assert
- * that they match, since we require that in practice.
+ * Deregister an interface and free the associated storage.
  */
 void
-if_free_type(struct ifnet *ifp, u_char type)
+if_free(struct ifnet *ifp)
 {
 
-	KASSERT(ifp->if_alloctype == type,
-	    ("if_free_type: type (%d) != alloctype (%d)", type,
-	    ifp->if_alloctype));
-
 	ifp->if_flags |= IFF_DYING;			/* XXX: Locking */
 
 	IFNET_WLOCK();
@@ -522,18 +515,6 @@ if_free_type(struct ifnet *ifp, u_char t
 }
 
 /*
- * This is the normal version of if_free(), used by device drivers to free a
- * detached network interface.  The contents of if_free_type() will move into
- * here when if_free_type() goes away.
- */
-void
-if_free(struct ifnet *ifp)
-{
-
-	if_free_type(ifp, ifp->if_alloctype);
-}
-
-/*
  * Interfaces to keep an ifnet type-stable despite the possibility of the
  * driver calling if_free().  If there are additional references, we defer
  * freeing the underlying data structure.

Modified: head/sys/net/if_var.h
==============================================================================
--- head/sys/net/if_var.h	Fri Dec  9 22:23:45 2011	(r228379)
+++ head/sys/net/if_var.h	Fri Dec  9 23:26:28 2011	(r228380)
@@ -865,7 +865,6 @@ void	if_down(struct ifnet *);
 struct ifmultiaddr *
 	if_findmulti(struct ifnet *, struct sockaddr *);
 void	if_free(struct ifnet *);
-void	if_free_type(struct ifnet *, u_char);
 void	if_initname(struct ifnet *, const char *, int);
 void	if_link_state_change(struct ifnet *, int);
 int	if_printf(struct ifnet *, const char *, ...) __printflike(2, 3);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112092326.pB9NQSeT054313>