Module Name: src Committed By: mrg Date: Fri Mar 14 21:59:41 UTC 2014
Modified Files: src/sys/arch/macppc/dev: am79c950.c cuda.c mesh.c pmu.c snapper.c src/sys/arch/macppc/macppc: disksubr.c src/sys/arch/powerpc/oea: cpu_subr.c src/sys/dev/pci: gffb.c Log Message: remove various set-but-unused variables. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/arch/macppc/dev/am79c950.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/macppc/dev/cuda.c cvs rdiff -u -r1.35 -r1.36 src/sys/arch/macppc/dev/mesh.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/macppc/dev/pmu.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/macppc/dev/snapper.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/macppc/macppc/disksubr.c cvs rdiff -u -r1.80 -r1.81 src/sys/arch/powerpc/oea/cpu_subr.c cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/gffb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/macppc/dev/am79c950.c diff -u src/sys/arch/macppc/dev/am79c950.c:1.32 src/sys/arch/macppc/dev/am79c950.c:1.33 --- src/sys/arch/macppc/dev/am79c950.c:1.32 Tue Jul 26 08:36:02 2011 +++ src/sys/arch/macppc/dev/am79c950.c Fri Mar 14 21:59:41 2014 @@ -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 <k...@bga.com> @@ -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 @@ mcintr(void *arg) 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) Index: src/sys/arch/macppc/dev/cuda.c diff -u src/sys/arch/macppc/dev/cuda.c:1.18 src/sys/arch/macppc/dev/cuda.c:1.19 --- src/sys/arch/macppc/dev/cuda.c:1.18 Tue Jul 30 15:31:49 2013 +++ src/sys/arch/macppc/dev/cuda.c Fri Mar 14 21:59:41 2014 @@ -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 @@ cuda_attach(device_t parent, device_t se 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_init(struct cuda_softc *sc) 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_init(struct cuda_softc *sc) 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 @@ static int 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 @@ switch_start: 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 */ Index: src/sys/arch/macppc/dev/mesh.c diff -u src/sys/arch/macppc/dev/mesh.c:1.35 src/sys/arch/macppc/dev/mesh.c:1.36 --- src/sys/arch/macppc/dev/mesh.c:1.35 Thu Jun 30 00:52:57 2011 +++ src/sys/arch/macppc/dev/mesh.c Fri Mar 14 21:59:41 2014 @@ -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 @@ mesh_intr(void *arg) 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 @@ mesh_intr(void *arg) 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 @@ mesh_scsi_request(struct scsipi_channel 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 @@ start: if (scb == NULL) return; - xs = scb->xs; - if (sc->sc_nexus == NULL) { TAILQ_REMOVE(&sc->ready_scb, scb, chain); sc->sc_nexus = scb; Index: src/sys/arch/macppc/dev/pmu.c diff -u src/sys/arch/macppc/dev/pmu.c:1.22 src/sys/arch/macppc/dev/pmu.c:1.23 --- src/sys/arch/macppc/dev/pmu.c:1.22 Tue Nov 5 11:08:20 2013 +++ src/sys/arch/macppc/dev/pmu.c Fri Mar 14 21:59:41 2014 @@ -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 @@ pmu_send_byte(struct pmu_softc *sc, uint 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 @@ static int 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 @@ pmu_adb_send(void *cookie, int poll, int 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; } Index: src/sys/arch/macppc/dev/snapper.c diff -u src/sys/arch/macppc/dev/snapper.c:1.38 src/sys/arch/macppc/dev/snapper.c:1.39 --- src/sys/arch/macppc/dev/snapper.c:1.38 Thu Nov 24 03:35:57 2011 +++ src/sys/arch/macppc/dev/snapper.c Fri Mar 14 21:59:41 2014 @@ -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 @@ snapper_attach(device_t parent, device_t { 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 @@ snapper_attach(device_t parent, device_t 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 @@ static void 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 @@ snapper_init(struct snapper_softc *sc, i &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) */ Index: src/sys/arch/macppc/macppc/disksubr.c diff -u src/sys/arch/macppc/macppc/disksubr.c:1.48 src/sys/arch/macppc/macppc/disksubr.c:1.49 --- src/sys/arch/macppc/macppc/disksubr.c:1.48 Tue Jan 24 15:24:55 2012 +++ src/sys/arch/macppc/macppc/disksubr.c Fri Mar 14 21:59:41 2014 @@ -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 @@ setpartition(struct part_map_entry *part 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 @@ getNamedType(struct part_map_entry *part 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); Index: src/sys/arch/powerpc/oea/cpu_subr.c diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.80 src/sys/arch/powerpc/oea/cpu_subr.c:1.81 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.80 Sun Nov 3 22:27:27 2013 +++ src/sys/arch/powerpc/oea/cpu_subr.c Fri Mar 14 21:59:41 2014 @@ -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 $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.81 2014/03/14 21:59:41 mrg Exp $"); #include "opt_ppcparam.h" #include "opt_ppccache.h" @@ -1218,11 +1218,9 @@ cpu_spinup(device_t self, struct cpu_inf { volatile struct cpu_hatch_data hatch_data, *h = &hatch_data; struct pglist mlist; - int i, error, pvr, vers; + int i, error; char *hp; - pvr = mfpvr(); - vers = pvr >> 16; KASSERT(ci != curcpu()); /* Now allocate a hatch stack */ Index: src/sys/dev/pci/gffb.c diff -u src/sys/dev/pci/gffb.c:1.7 src/sys/dev/pci/gffb.c:1.8 --- src/sys/dev/pci/gffb.c:1.7 Wed Oct 23 13:15:47 2013 +++ src/sys/dev/pci/gffb.c Fri Mar 14 21:59:41 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: gffb.c,v 1.7 2013/10/23 13:15:47 macallan Exp $ */ +/* $NetBSD: gffb.c,v 1.8 2014/03/14 21:59:41 mrg Exp $ */ /* * Copyright (c) 2013 Michael Lorenz @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gffb.c,v 1.7 2013/10/23 13:15:47 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gffb.c,v 1.8 2014/03/14 21:59:41 mrg Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -644,12 +644,11 @@ gffb_putpalreg(struct gffb_softc *sc, ui static void gffb_dma_kickoff(struct gffb_softc *sc) { - volatile uint8_t scratch; - if(sc->sc_current != sc->sc_put) { + if (sc->sc_current != sc->sc_put) { sc->sc_put = sc->sc_current; membar_sync(); - scratch = *sc->sc_fbaddr; + (void)*sc->sc_fbaddr; GFFB_WRITE_4(GFFB_FIFO_PUT, sc->sc_put); membar_sync(); }