From: Sascha Wildner Date: Fri, 31 Aug 2012 22:06:05 +0000 (+0200) Subject: amr(4): Remove some unused code (amr_timeout()). X-Git-Tag: v3.2.0~223 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/71fdcb31e3fe836d62d3e05c05a851bfd4a0e609?ds=sidebyside amr(4): Remove some unused code (amr_timeout()). Taken-from: FreeBSD --- diff --git a/sys/dev/raid/amr/amr.c b/sys/dev/raid/amr/amr.c index 21de0b98b7..7781158cbf 100644 --- a/sys/dev/raid/amr/amr.c +++ b/sys/dev/raid/amr/amr.c @@ -54,7 +54,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/amr/amr.c,v 1.97 2012/04/20 20:27:31 jhb Exp $ + * $FreeBSD: src/sys/dev/amr/amr.c,v 1.99 2012/08/31 09:42:46 scottl Exp $ */ /* @@ -136,13 +136,6 @@ static void amr_setup_data(void *arg, bus_dma_segment_t *segs, int nsegments, in static void amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegments, int error); static void amr_abort_load(struct amr_command *ac); -#if 0 -/* - * Status monitoring - */ -static void amr_periodic(void *data); -#endif - /* * Interface-specific shims */ @@ -315,7 +308,6 @@ amr_startup(void *arg) int i, error; debug_called(1); - callout_init(&sc->amr_timeout); /* pull ourselves off the intrhook chain */ if (sc->amr_ich.ich_func) @@ -358,13 +350,6 @@ amr_startup(void *arg) /* interrupts will be enabled before we do anything more */ sc->amr_state |= AMR_STATE_INTEN; -#if 0 - /* - * Start the timeout routine. - */ - sc->amr_timeout = timeout(amr_periodic, sc, hz); -#endif - return; } @@ -403,9 +388,6 @@ amr_free(struct amr_softc *sc) if (sc->amr_pass != NULL) device_delete_child(sc->amr_dev, sc->amr_pass); - /* cancel status timeout */ - callout_stop(&sc->amr_timeout); - /* throw away any command buffers */ while ((acc = TAILQ_FIRST(&sc->amr_cmd_clusters)) != NULL) { TAILQ_REMOVE(&sc->amr_cmd_clusters, acc, acc_link); @@ -936,33 +918,6 @@ out: return(error); } -#if 0 -/******************************************************************************** - ******************************************************************************** - Status Monitoring - ******************************************************************************** - ********************************************************************************/ - -/******************************************************************************** - * Perform a periodic check of the controller status - */ -static void -amr_periodic(void *data) -{ - struct amr_softc *sc = (struct amr_softc *)data; - - debug_called(2); - - /* XXX perform periodic status checks here */ - - /* compensate for missed interrupts */ - amr_done(sc); - - /* reschedule */ - callout_reset(&sc->amr_timeout, hz, amr_periodic, sc); -} -#endif - /******************************************************************************** ******************************************************************************** Command Wrappers diff --git a/sys/dev/raid/amr/amrvar.h b/sys/dev/raid/amr/amrvar.h index 534914b665..eee6069404 100644 --- a/sys/dev/raid/amr/amrvar.h +++ b/sys/dev/raid/amr/amrvar.h @@ -53,7 +53,7 @@ * SUCH DAMAGE. * * - * $FreeBSD: src/sys/dev/amr/amrvar.h,v 1.37 2010/07/28 16:24:11 mdf Exp $ + * $FreeBSD: src/sys/dev/amr/amrvar.h,v 1.39 2012/08/31 09:42:46 scottl Exp $ */ #include @@ -261,7 +261,6 @@ struct amr_softc device_t amr_pass; int (*amr_cam_command)(struct amr_softc *sc, struct amr_command **acp); struct intr_config_hook amr_ich; /* wait-for-interrupts probe hook */ - struct callout amr_timeout; /* periodic status check */ int amr_allow_vol_config; int amr_linux_no_adapters; int amr_ld_del_supported;