kernel: Remove some unused variables.
authorSascha Wildner <saw@online.de>
Sat, 16 Feb 2013 12:42:04 +0000 (13:42 +0100)
committerSascha Wildner <saw@online.de>
Sat, 16 Feb 2013 12:53:39 +0000 (13:53 +0100)
sys/dev/raid/vinum/vinumconfig.c
sys/dev/sound/pci/emu10k1.c
sys/dev/sound/pci/hda/hdac.c
sys/dev/sound/pcm/ac97.c

index 21bb1ca..f100bb1 100644 (file)
@@ -1908,7 +1908,6 @@ update_plex_config(int plexno, int diskconfig)
     u_int64_t size;
     int sdno;
     struct plex *plex = &PLEX[plexno];
-    enum plexstate state = plex_up;                        /* state we want the plex in */
     int remainder;                                         /* size of fractional stripe at end */
     int added_plex;                                        /* set if we add a plex to a volume */
     int required_sds;                                      /* number of subdisks we need */
@@ -1934,7 +1933,6 @@ update_plex_config(int plexno, int diskconfig)
            && (vol->plexes > 0)
            && (diskconfig == 0)) {
            added_plex = 1;
-           state = plex_down;                              /* so take ourselves down */
        }
     }
     /*
@@ -1957,7 +1955,6 @@ update_plex_config(int plexno, int diskconfig)
                "vinum: plex %s does not have at least %d subdisks\n",
                plex->name,
                required_sds);
-           state = plex_faulty;
        }
        /*
         * Now see if the plex size is a multiple of
@@ -1995,7 +1992,6 @@ update_plex_config(int plexno, int diskconfig)
            && (sdno > 0)
            && (sd->sectors != SD[plex->sdnos[sdno - 1]].sectors)) {
            log(LOG_ERR, "vinum: %s must have equal sized subdisks\n", plex->name);
-           state = plex_down;
        }
        size += sd->sectors;
        if (added_plex) {                                   /* we were added later */
@@ -2020,7 +2016,6 @@ update_plex_config(int plexno, int diskconfig)
        plex->length = size;
     } else {                                               /* no subdisks, */
        plex->length = 0;                                   /* no size */
-       state = plex_down;                                  /* take it down */
     }
     update_plex_state(plexno);                             /* set the state */
     plex->flags &= ~VF_NEWBORN;
index 1f0471b..6059596 100644 (file)
@@ -775,12 +775,10 @@ emupchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize)
 {
        struct sc_pchinfo *ch = data;
        struct sc_info *sc = ch->parent;
-       int irqrate;
 
        ch->blksz = blocksize;
        snd_mtxlock(sc->lock);
        emu_settimer(sc);
-       irqrate = 48000 / sc->timerinterval;
        snd_mtxunlock(sc->lock);
        return blocksize;
 }
@@ -935,12 +933,10 @@ emurchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize)
 {
        struct sc_rchinfo *ch = data;
        struct sc_info *sc = ch->parent;
-       int irqrate;
 
        ch->blksz = blocksize;
        snd_mtxlock(sc->lock);
        emu_settimer(sc);
-       irqrate = 48000 / sc->timerinterval;
        snd_mtxunlock(sc->lock);
        return blocksize;
 }
index 8e91e96..f9ffd20 100644 (file)
@@ -2174,13 +2174,12 @@ static uint32_t
 hdac_widget_pin_getcaps(struct hdac_widget *w)
 {
        struct hdac_softc *sc;
-       uint32_t caps, orig, id;
+       uint32_t caps, orig;
        nid_t cad, nid;
 
        sc = w->devinfo->codec->sc;
        cad = w->devinfo->codec->cad;
        nid = w->nid;
-       id = hdac_codec_id(w->devinfo);
 
        caps = hdac_command(sc,
            HDA_CMD_GET_PARAMETER(cad, nid, HDA_PARAM_PIN_CAP), cad);
index 5316782..328c48a 100644 (file)
@@ -597,7 +597,6 @@ ac97_initmixer(struct ac97_info *codec)
        ac97_patch codec_patch;
        const char *cname, *vname;
        char desc[80];
-       u_int8_t step;
        unsigned i, j, k, bit, old;
        u_int32_t id;
        int reg;
@@ -643,14 +642,12 @@ ac97_initmixer(struct ac97_info *codec)
        codec_patch = NULL;
 
        cname = NULL;
-       step = 0;
        for (i = 0; ac97codecid[i].id; i++) {
                u_int32_t modelmask = 0xffffffff ^ ac97codecid[i].stepmask;
                if ((ac97codecid[i].id & modelmask) == (id & modelmask)) {
                        codec->noext = ac97codecid[i].noext;
                        codec_patch = ac97codecid[i].patch;
                        cname = ac97codecid[i].name;
-                       step = (id & ~modelmask) & 0xff;
                        break;
                }
        }