Remove dead codes and make if_free_sadl static

No functional change.
This commit is contained in:
ozaki-r 2014-11-28 08:29:00 +00:00
parent f0f069cba4
commit 7ccd75e01e
6 changed files with 14 additions and 29 deletions

View File

@ -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 if_detach_queues(struct ifnet *, struct ifqueue *);
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 @@ if_activate_sadl(struct ifnet *ifp, struct ifaddr *ifa,
/*
* 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;

View File

@ -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 @@ void if_activate_sadl(struct ifnet *, struct ifaddr *,
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 *);

View File

@ -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 @@ ether_ifdetach(struct ifnet *ifp)
}
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);

View File

@ -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 @@ ieee1394_ifdetach(struct ifnet *ifp)
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

View File

@ -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 @@ sppp_detach(struct ifnet *ifp)
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
}
/*

View File

@ -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 @@ token_ifdetach(struct ifnet *ifp)
{
bpf_detach(ifp);
#if 0 /* done in if_detach() */
if_free_sadl(ifp);
#endif
}