mirror of
https://github.com/opnsense/src.git
synced 2026-02-14 08:13:38 -05:00
Fix "set but not used" in the tws driver
Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
74765431b7
commit
a21f086a33
3 changed files with 7 additions and 10 deletions
|
|
@ -349,7 +349,7 @@ tws_detach(device_t dev)
|
|||
{
|
||||
struct tws_softc *sc = device_get_softc(dev);
|
||||
int i;
|
||||
u_int32_t reg;
|
||||
u_int32_t reg __diagused;
|
||||
|
||||
TWS_TRACE_DEBUG(sc, "entry", 0, 0);
|
||||
|
||||
|
|
@ -452,11 +452,11 @@ tws_setup_intr(struct tws_softc *sc, int irqs)
|
|||
int
|
||||
tws_teardown_intr(struct tws_softc *sc)
|
||||
{
|
||||
int i, error;
|
||||
int i;
|
||||
|
||||
for(i=0;i<sc->irqs;i++) {
|
||||
if (sc->intr_handle[i]) {
|
||||
error = bus_teardown_intr(sc->tws_dev,
|
||||
bus_teardown_intr(sc->tws_dev,
|
||||
sc->irq_res[i], sc->intr_handle[i]);
|
||||
sc->intr_handle[i] = NULL;
|
||||
}
|
||||
|
|
@ -509,7 +509,6 @@ tws_init(struct tws_softc *sc)
|
|||
|
||||
u_int32_t max_sg_elements;
|
||||
u_int32_t dma_mem_size;
|
||||
int error;
|
||||
u_int32_t reg;
|
||||
|
||||
sc->seq_id = 0;
|
||||
|
|
@ -569,7 +568,7 @@ tws_init(struct tws_softc *sc)
|
|||
|
||||
/* if bus_dmamem_alloc succeeds then bus_dmamap_load will succeed */
|
||||
sc->dma_mem_phys=0;
|
||||
error = bus_dmamap_load(sc->cmd_tag, sc->cmd_map, sc->dma_mem,
|
||||
bus_dmamap_load(sc->cmd_tag, sc->cmd_map, sc->dma_mem,
|
||||
dma_mem_size, tws_dmamap_cmds_load_cbfn,
|
||||
&sc->dma_mem_phys, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -1067,24 +1067,22 @@ tws_intr(void *arg)
|
|||
static void
|
||||
tws_intr_attn_aen(struct tws_softc *sc)
|
||||
{
|
||||
u_int32_t db=0;
|
||||
|
||||
/* maskoff db intrs until all the aens are fetched */
|
||||
/* tws_disable_db_intr(sc); */
|
||||
tws_fetch_aen((void *)sc);
|
||||
tws_write_reg(sc, TWS_I2O0_HOBDBC, TWS_BIT18, 4);
|
||||
db = tws_read_reg(sc, TWS_I2O0_IOBDB, 4);
|
||||
(void)tws_read_reg(sc, TWS_I2O0_IOBDB, 4);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
tws_intr_attn_error(struct tws_softc *sc)
|
||||
{
|
||||
u_int32_t db=0;
|
||||
|
||||
TWS_TRACE(sc, "attn error", 0, 0);
|
||||
tws_write_reg(sc, TWS_I2O0_HOBDBC, ~0, 4);
|
||||
db = tws_read_reg(sc, TWS_I2O0_IOBDB, 4);
|
||||
(void)tws_read_reg(sc, TWS_I2O0_IOBDB, 4);
|
||||
device_printf(sc->tws_dev, "Micro controller error.\n");
|
||||
tws_reset(sc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ void tws_display_ctlr_info(struct tws_softc *sc);
|
|||
int
|
||||
tws_init_ctlr(struct tws_softc *sc)
|
||||
{
|
||||
u_int64_t reg;
|
||||
u_int64_t reg __diagused;
|
||||
u_int32_t regh, regl;
|
||||
|
||||
TWS_TRACE_DEBUG(sc, "entry", sc, sc->is64bit);
|
||||
|
|
|
|||
Loading…
Reference in a new issue