Skip to content

Commit

Permalink
Empty if_watchdog functions are useless and now waste resources. Let's
Browse files Browse the repository at this point in the history
remove them.
  • Loading branch information
skrll committed Aug 28, 2022
1 parent 7c15d30 commit a1bd053
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
11 changes: 2 additions & 9 deletions sys/dev/pci/if_ixl.c
@@ -1,4 +1,4 @@
/* $NetBSD: if_ixl.c,v 1.86 2022/08/25 09:15:14 knakahara Exp $ */
/* $NetBSD: if_ixl.c,v 1.87 2022/08/28 07:54:03 skrll Exp $ */

/*
* Copyright (c) 2013-2015, Intel Corporation
Expand Down Expand Up @@ -74,7 +74,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.86 2022/08/25 09:15:14 knakahara Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.87 2022/08/28 07:54:03 skrll Exp $");

#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
Expand Down Expand Up @@ -785,7 +785,6 @@ static int ixl_detach(device_t, int);
static void ixl_media_add(struct ixl_softc *);
static int ixl_media_change(struct ifnet *);
static void ixl_media_status(struct ifnet *, struct ifmediareq *);
static void ixl_watchdog(struct ifnet *);
static int ixl_ioctl(struct ifnet *, u_long, void *);
static void ixl_start(struct ifnet *);
static int ixl_transmit(struct ifnet *, struct mbuf *);
Expand Down Expand Up @@ -1300,7 +1299,6 @@ ixl_attach(device_t parent, device_t self, void *aux)
ifp->if_ioctl = ixl_ioctl;
ifp->if_start = ixl_start;
ifp->if_transmit = ixl_transmit;
ifp->if_watchdog = ixl_watchdog;
ifp->if_init = ixl_init;
ifp->if_stop = ixl_stop;
IFQ_SET_MAXLEN(&ifp->if_snd, sc->sc_tx_ring_ndescs);
Expand Down Expand Up @@ -1675,11 +1673,6 @@ ixl_media_change(struct ifnet *ifp)
return ixl_set_phy_config(sc, link_speed, abilities, false);
}

static void
ixl_watchdog(struct ifnet *ifp)
{

}

static void
ixl_del_all_multiaddr(struct ixl_softc *sc)
Expand Down
10 changes: 2 additions & 8 deletions sys/dev/pci/if_mcx.c
@@ -1,4 +1,4 @@
/* $NetBSD: if_mcx.c,v 1.24 2022/07/07 06:11:19 skrll Exp $ */
/* $NetBSD: if_mcx.c,v 1.25 2022/08/28 07:54:03 skrll Exp $ */
/* $OpenBSD: if_mcx.c,v 1.101 2021/06/02 19:16:11 patrick Exp $ */

/*
Expand All @@ -23,7 +23,7 @@
#endif

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.24 2022/07/07 06:11:19 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mcx.c,v 1.25 2022/08/28 07:54:03 skrll Exp $");

#include <sys/param.h>
#include <sys/systm.h>
Expand Down Expand Up @@ -2634,7 +2634,6 @@ static int mcx_ioctl(struct ifnet *, u_long, void *);
static void mcx_start(struct ifnet *);
static int mcx_transmit(struct ifnet *, struct mbuf *);
static void mcx_deferred_transmit(void *);
static void mcx_watchdog(struct ifnet *);
static void mcx_media_add_types(struct mcx_softc *);
static void mcx_media_status(struct ifnet *, struct ifmediareq *);
static int mcx_media_change(struct ifnet *);
Expand Down Expand Up @@ -2975,7 +2974,6 @@ mcx_attach(device_t parent, device_t self, void *aux)
if (sc->sc_nqueues > 1) {
ifp->if_transmit = mcx_transmit;
}
ifp->if_watchdog = mcx_watchdog;
ifp->if_mtu = sc->sc_hardmtu;
ifp->if_capabilities = IFCAP_CSUM_IPv4_Rx | IFCAP_CSUM_IPv4_Tx |
IFCAP_CSUM_UDPv4_Rx | IFCAP_CSUM_UDPv4_Tx |
Expand Down Expand Up @@ -8005,10 +8003,6 @@ mcx_deferred_transmit(void *arg)
mutex_exit(&tx->tx_lock);
}

static void
mcx_watchdog(struct ifnet *ifp)
{
}

static void
mcx_media_add_types(struct mcx_softc *sc)
Expand Down

0 comments on commit a1bd053

Please sign in to comment.