Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys remove various set-but-unused variables.



details:   https://anonhg.NetBSD.org/src/rev/a3aeb90e0b00
branches:  trunk
changeset: 327703:a3aeb90e0b00
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Mar 14 21:59:41 2014 +0000

description:
remove various set-but-unused variables.

diffstat:

 sys/arch/macppc/dev/am79c950.c    |   8 ++++----
 sys/arch/macppc/dev/cuda.c        |  13 ++++++-------
 sys/arch/macppc/dev/mesh.c        |  11 ++++-------
 sys/arch/macppc/dev/pmu.c         |  11 +++++------
 sys/arch/macppc/dev/snapper.c     |  11 +++++------
 sys/arch/macppc/macppc/disksubr.c |   9 ++-------
 sys/arch/powerpc/oea/cpu_subr.c   |   8 +++-----
 sys/dev/pci/gffb.c                |   9 ++++-----
 8 files changed, 33 insertions(+), 47 deletions(-)

diffs (truncated from 350 to 300 lines):

diff -r e4b7e84f85e5 -r a3aeb90e0b00 sys/arch/macppc/dev/am79c950.c
--- a/sys/arch/macppc/dev/am79c950.c    Fri Mar 14 21:40:48 2014 +0000
+++ b/sys/arch/macppc/dev/am79c950.c    Fri Mar 14 21:59:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: am79c950.c,v 1.32 2011/07/26 08:36:02 macallan Exp $   */
+/*     $NetBSD: am79c950.c,v 1.33 2014/03/14 21:59:41 mrg Exp $        */
 
 /*-
  * Copyright (c) 1997 David Huang <khym%bga.com@localhost>
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.32 2011/07/26 08:36:02 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: am79c950.c,v 1.33 2014/03/14 21:59:41 mrg Exp $");
 
 #include "opt_inet.h"
 
@@ -484,9 +484,9 @@
 integrate void
 mc_tint(struct mc_softc *sc)
 {
-       u_int8_t xmtrc, xmtfs;
+       u_int8_t xmtfs;
 
-       xmtrc = NIC_GET(sc, MACE_XMTRC);
+       (void)NIC_GET(sc, MACE_XMTRC);
        xmtfs = NIC_GET(sc, MACE_XMTFS);
 
        if ((xmtfs & XMTSV) == 0)
diff -r e4b7e84f85e5 -r a3aeb90e0b00 sys/arch/macppc/dev/cuda.c
--- a/sys/arch/macppc/dev/cuda.c        Fri Mar 14 21:40:48 2014 +0000
+++ b/sys/arch/macppc/dev/cuda.c        Fri Mar 14 21:59:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cuda.c,v 1.18 2013/07/30 15:31:49 joerg Exp $ */
+/*     $NetBSD: cuda.c,v 1.19 2014/03/14 21:59:41 mrg Exp $ */
 
 /*-
  * Copyright (c) 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.18 2013/07/30 15:31:49 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cuda.c,v 1.19 2014/03/14 21:59:41 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -270,7 +270,6 @@
 static void
 cuda_init(struct cuda_softc *sc)
 {
-       volatile int i;
        uint8_t reg;
 
        reg = cuda_read_reg(sc, vDirB);
@@ -293,7 +292,7 @@
        cuda_idle(sc);  /* set ADB bus state to idle */
 
        /* sort of a device reset */
-       i = cuda_read_reg(sc, vSR);     /* clear interrupt */
+       (void)cuda_read_reg(sc, vSR);   /* clear interrupt */
        cuda_write_reg(sc, vIER, 0x04); /* no interrupts while clearing */
        cuda_idle(sc);  /* reset state to idle */
        delay(150);
@@ -304,7 +303,7 @@
        cuda_clear_tip(sc);
        delay(150);
        cuda_idle(sc);  /* back to idle state */
-       i = cuda_read_reg(sc, vSR);     /* clear interrupt */
+       (void)cuda_read_reg(sc, vSR);   /* clear interrupt */
        cuda_write_reg(sc, vIER, 0x84); /* ints ok now */
 }
 
@@ -506,7 +505,7 @@
 cuda_intr(void *arg)
 {
        struct cuda_softc *sc = arg;
-       int i, ending, type;
+       int ending, type;
        uint8_t reg;
 
        reg = cuda_read_reg(sc, vIFR);          /* Read the interrupts */
@@ -651,7 +650,7 @@
                break;
 
        case CUDA_OUT:
-               i = cuda_read_reg(sc, vSR);     /* reset SR-intr in IFR */
+               (void)cuda_read_reg(sc, vSR);   /* reset SR-intr in IFR */
 
                sc->sc_sent++;
                if (cuda_intr_state(sc)) {      /* ADB intr low during write */
diff -r e4b7e84f85e5 -r a3aeb90e0b00 sys/arch/macppc/dev/mesh.c
--- a/sys/arch/macppc/dev/mesh.c        Fri Mar 14 21:40:48 2014 +0000
+++ b/sys/arch/macppc/dev/mesh.c        Fri Mar 14 21:59:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mesh.c,v 1.35 2011/06/30 00:52:57 matt Exp $   */
+/*     $NetBSD: mesh.c,v 1.36 2014/03/14 21:59:41 mrg Exp $    */
 
 /*-
  * Copyright (c) 2000  Tsubai Masanari.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mesh.c,v 1.35 2011/06/30 00:52:57 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mesh.c,v 1.36 2014/03/14 21:59:41 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -321,7 +321,7 @@
        struct mesh_softc *sc = arg;
        struct mesh_scb *scb;
        int fifocnt;
-       u_char intr, exception, error, status0, status1;
+       u_char intr, exception, error, status0;
 
        intr = mesh_read_reg(sc, MESH_INTERRUPT);
        if (intr == 0) {
@@ -332,7 +332,7 @@
        exception = mesh_read_reg(sc, MESH_EXCEPTION);
        error = mesh_read_reg(sc, MESH_ERROR);
        status0 = mesh_read_reg(sc, MESH_BUS_STATUS0);
-       status1 = mesh_read_reg(sc, MESH_BUS_STATUS1);
+       (void)mesh_read_reg(sc, MESH_BUS_STATUS1);
 
        /* clear interrupt */
        mesh_set_reg(sc, MESH_INTERRUPT, intr);
@@ -1038,7 +1038,6 @@
 void
 mesh_sched(struct mesh_softc *sc)
 {
-       struct scsipi_xfer *xs;
        struct mesh_scb *scb;
 
        scb = sc->ready_scb.tqh_first;
@@ -1046,8 +1045,6 @@
        if (scb == NULL)
                return;
 
-       xs = scb->xs;
-
        if (sc->sc_nexus == NULL) {
                TAILQ_REMOVE(&sc->ready_scb, scb, chain);
                sc->sc_nexus = scb;
diff -r e4b7e84f85e5 -r a3aeb90e0b00 sys/arch/macppc/dev/pmu.c
--- a/sys/arch/macppc/dev/pmu.c Fri Mar 14 21:40:48 2014 +0000
+++ b/sys/arch/macppc/dev/pmu.c Fri Mar 14 21:59:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmu.c,v 1.22 2013/11/05 11:08:20 macallan Exp $ */
+/*     $NetBSD: pmu.c,v 1.23 2014/03/14 21:59:41 mrg Exp $ */
 
 /*-
  * Copyright (c) 2006 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.22 2013/11/05 11:08:20 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmu.c,v 1.23 2014/03/14 21:59:41 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -467,9 +467,8 @@
 static inline int
 pmu_read_byte(struct pmu_softc *sc, uint8_t *data)
 {
-       volatile uint8_t scratch;
        pmu_in(sc);
-       scratch = pmu_read_reg(sc, vSR);
+       (void)pmu_read_reg(sc, vSR);
        pmu_ack_off(sc);
        /* wait for intr to come up */
        do {} while (pmu_intr_state(sc) == 0);
@@ -827,7 +826,7 @@
 pmu_adb_send(void *cookie, int poll, int command, int len, uint8_t *data)
 {
        struct pmu_softc *sc = cookie;
-       int i, replen;
+       int i;
        uint8_t packet[16], resp[16];
 
        /* construct an ADB command packet and send it */
@@ -836,7 +835,7 @@
        packet[2] = len;
        for (i = 0; i < len; i++)
                packet[i + 3] = data[i];
-       replen = pmu_send(sc, PMU_ADB_CMD, len + 3, packet, 16, resp);
+       (void)pmu_send(sc, PMU_ADB_CMD, len + 3, packet, 16, resp);
 
        return 0;
 }
diff -r e4b7e84f85e5 -r a3aeb90e0b00 sys/arch/macppc/dev/snapper.c
--- a/sys/arch/macppc/dev/snapper.c     Fri Mar 14 21:40:48 2014 +0000
+++ b/sys/arch/macppc/dev/snapper.c     Fri Mar 14 21:59:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: snapper.c,v 1.38 2011/11/24 03:35:57 mrg Exp $ */
+/*     $NetBSD: snapper.c,v 1.39 2014/03/14 21:59:41 mrg Exp $ */
 /*     Id: snapper.c,v 1.11 2002/10/31 17:42:13 tsubai Exp     */
 /*     Id: i2s.c,v 1.12 2005/01/15 14:32:35 tsubai Exp         */
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.38 2011/11/24 03:35:57 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: snapper.c,v 1.39 2014/03/14 21:59:41 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/audioio.h>
@@ -725,7 +725,7 @@
 {
        struct snapper_softc *sc;
        struct confargs *ca;
-       int cirq, oirq, iirq, cirq_type, oirq_type, iirq_type, soundbus;
+       int cirq, oirq, iirq, /*cirq_type,*/ oirq_type, iirq_type, soundbus;
        uint32_t intr[6], reg[6];
        char compat[32];
 
@@ -782,7 +782,7 @@
        cirq = intr[0];
        oirq = intr[2];
        iirq = intr[4];
-       cirq_type = intr[1] ? IST_LEVEL : IST_EDGE;
+       /* cirq_type = intr[1] ? IST_LEVEL : IST_EDGE; */
        oirq_type = intr[3] ? IST_LEVEL : IST_EDGE;
        iirq_type = intr[5] ? IST_LEVEL : IST_EDGE;
 
@@ -2045,7 +2045,7 @@
 snapper_init(struct snapper_softc *sc, int node)
 {
        int gpio;
-       int headphone_detect_intr, headphone_detect_intrtype;
+       int headphone_detect_intr;
        uint32_t gpio_base, reg[1];
 #ifdef SNAPPER_DEBUG
        char fcr[32];
@@ -2096,7 +2096,6 @@
                            &headphone_detect_active, 4);
                        if (OF_getprop(gpio, "interrupts", intr, 8) == 8) {
                                headphone_detect_intr = intr[0];
-                               headphone_detect_intrtype = intr[1];
                        }
                }
                /* gpio11 (keywest-11) */
diff -r e4b7e84f85e5 -r a3aeb90e0b00 sys/arch/macppc/macppc/disksubr.c
--- a/sys/arch/macppc/macppc/disksubr.c Fri Mar 14 21:40:48 2014 +0000
+++ b/sys/arch/macppc/macppc/disksubr.c Fri Mar 14 21:59:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.48 2012/01/24 15:24:55 hauke Exp $      */
+/*     $NetBSD: disksubr.c,v 1.49 2014/03/14 21:59:41 mrg Exp $        */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -106,7 +106,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.48 2012/01/24 15:24:55 hauke Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.49 2014/03/14 21:59:41 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -262,7 +262,6 @@
 static int
 getNamedType(struct part_map_entry *part, int num_parts, struct disklabel *lp, int type, int alt, int *maxslot)
 {
-       struct blockzeroblock *bzb;
        int i = 0, clust;
        u_int8_t realtype;
 
@@ -271,14 +270,10 @@
                        continue;
 
                if (type == ROOT_PART) {
-                       bzb = (struct blockzeroblock *)
-                           (&(part + i)->pmBootArgs);
                        if (alt >= 0 && alt != clust)
                                continue;
                        setpartition(part + i, &lp->d_partitions[0], realtype);
                } else if (type == UFS_PART) {
-                       bzb = (struct blockzeroblock *)
-                           (&(part + i)->pmBootArgs);
                        if (alt >= 0 && alt != clust)
                                continue;
                        setpartition(part + i, &lp->d_partitions[6], realtype);
diff -r e4b7e84f85e5 -r a3aeb90e0b00 sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c   Fri Mar 14 21:40:48 2014 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c   Fri Mar 14 21:59:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu_subr.c,v 1.80 2013/11/03 22:27:27 mrg Exp $        */
+/*     $NetBSD: cpu_subr.c,v 1.81 2014/03/14 21:59:41 mrg Exp $        */
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.80 2013/11/03 22:27:27 mrg Exp $");



Home | Main Index | Thread Index | Old Index