From 6aedf62f3286790be7021a93481ad265a908ccf1 Mon Sep 17 00:00:00 2001 From: Scott Long Date: Fri, 31 Aug 2012 09:42:46 +0000 Subject: [PATCH] Essentially revert r239912. The amr_periodic function hadn't been armed in over 10 years and was dead code; the previous revision exposed it as such to CLANG. The solution is to cull the whole thing. --- sys/dev/amr/amr.c | 38 -------------------------------------- sys/dev/amr/amr_pci.c | 1 - sys/dev/amr/amrvar.h | 1 - 3 files changed, 40 deletions(-) diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c index 412b7f52f0a2..de91c3ef0231 100644 --- a/sys/dev/amr/amr.c +++ b/sys/dev/amr/amr.c @@ -138,11 +138,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); -/* - * Status monitoring - */ -static void amr_periodic(void *data); - /* * Interface-specific shims */ @@ -348,11 +343,6 @@ amr_startup(void *arg) /* interrupts will be enabled before we do anything more */ sc->amr_state |= AMR_STATE_INTEN; - /* - * Start the timeout routine. - */ -/* callout_reset(&sc->amr_timeout, hz, amr_periodic, sc);*/ - return; } @@ -391,9 +381,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_drain(&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); @@ -957,31 +944,6 @@ out: return(error); } -/******************************************************************************** - ******************************************************************************** - 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); -} - /******************************************************************************** ******************************************************************************** Command Wrappers diff --git a/sys/dev/amr/amr_pci.c b/sys/dev/amr/amr_pci.c index 29afaa3510c3..f47d408764db 100644 --- a/sys/dev/amr/amr_pci.c +++ b/sys/dev/amr/amr_pci.c @@ -331,7 +331,6 @@ amr_pci_attach(device_t dev) */ mtx_init(&sc->amr_list_lock, "AMR List Lock", NULL, MTX_DEF); mtx_init(&sc->amr_hw_lock, "AMR HW Lock", NULL, MTX_DEF); - callout_init(&sc->amr_timeout, CALLOUT_MPSAFE); if ((error = amr_setup_mbox(sc)) != 0) goto out; diff --git a/sys/dev/amr/amrvar.h b/sys/dev/amr/amrvar.h index aff5ddb05f9d..71678396332d 100644 --- a/sys/dev/amr/amrvar.h +++ b/sys/dev/amr/amrvar.h @@ -256,7 +256,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;