From 96a98cbf141c199bd2cf30330a3db284258995b9 Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 28 Oct 2016 07:59:02 +0000 Subject: [PATCH] hyperv/hn: Nuke unnecessary indirection. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8355 --- sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c | 5 +++-- sys/dev/hyperv/netvsc/hv_rndis_filter.c | 7 ------- sys/dev/hyperv/netvsc/hv_rndis_filter.h | 2 -- sys/dev/hyperv/netvsc/if_hnvar.h | 1 - 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c index f34ed18e50c8..026af419cafd 100644 --- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c +++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c @@ -358,6 +358,7 @@ static void hn_chan_detach(struct hn_softc *, struct vmbus_channel *); static int hn_attach_subchans(struct hn_softc *); static void hn_detach_allchans(struct hn_softc *); static void hn_chan_callback(struct vmbus_channel *chan, void *xrxr); +static void hn_chan_rollup(struct hn_rx_ring *, struct hn_tx_ring *); static void hn_set_ring_inuse(struct hn_softc *, int); static int hn_synth_attach(struct hn_softc *, int); static void hn_synth_detach(struct hn_softc *); @@ -1188,7 +1189,7 @@ hn_tx_done(struct hn_nvs_sendctx *sndc, struct hn_softc *sc, } } -void +static void hn_chan_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr) { #if defined(INET) || defined(INET6) @@ -4213,7 +4214,7 @@ hn_chan_callback(struct vmbus_channel *chan, void *xrxr) if (bufferlen > HN_PKTBUF_LEN) free(buffer, M_DEVBUF); - hv_rf_channel_rollup(rxr, rxr->hn_txr); + hn_chan_rollup(rxr, rxr->hn_txr); } static void diff --git a/sys/dev/hyperv/netvsc/hv_rndis_filter.c b/sys/dev/hyperv/netvsc/hv_rndis_filter.c index d3ddc38d23a7..8f77129696de 100644 --- a/sys/dev/hyperv/netvsc/hv_rndis_filter.c +++ b/sys/dev/hyperv/netvsc/hv_rndis_filter.c @@ -1352,10 +1352,3 @@ hn_rndis_detach(struct hn_softc *sc) /* Halt the RNDIS. */ hn_rndis_halt(sc); } - -void -hv_rf_channel_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr) -{ - - hn_chan_rollup(rxr, txr); -} diff --git a/sys/dev/hyperv/netvsc/hv_rndis_filter.h b/sys/dev/hyperv/netvsc/hv_rndis_filter.h index 3ecda3b80d03..80d8183eef97 100644 --- a/sys/dev/hyperv/netvsc/hv_rndis_filter.h +++ b/sys/dev/hyperv/netvsc/hv_rndis_filter.h @@ -42,7 +42,5 @@ struct hn_rx_ring; void hv_rf_on_receive(struct hn_softc *sc, struct hn_rx_ring *rxr, const void *data, int dlen); -void hv_rf_channel_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr); #endif /* __HV_RNDIS_FILTER_H__ */ - diff --git a/sys/dev/hyperv/netvsc/if_hnvar.h b/sys/dev/hyperv/netvsc/if_hnvar.h index a22197a138d1..abd18d565fcd 100644 --- a/sys/dev/hyperv/netvsc/if_hnvar.h +++ b/sys/dev/hyperv/netvsc/if_hnvar.h @@ -258,7 +258,6 @@ int hn_rndis_set_rxfilter(struct hn_softc *sc, uint32_t filter); int hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int dlen, const struct hn_recvinfo *info); -void hn_chan_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr); void hn_link_status_update(struct hn_softc *sc); void hn_network_change(struct hn_softc *sc);