Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sgimips - remove unused variables



details:   https://anonhg.NetBSD.org/src/rev/a806b27d972e
branches:  trunk
changeset: 325279:a806b27d972e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Dec 16 15:45:29 2013 +0000

description:
- remove unused variables
- use (void) when we don't care about the return value

diffstat:

 sys/arch/sgimips/dev/crmfb.c         |   6 ++----
 sys/arch/sgimips/mace/mace.c         |   8 +++-----
 sys/arch/sgimips/mace/mcclock_mace.c |   7 +++----
 sys/arch/sgimips/sgimips/autoconf.c  |   7 +++----
 sys/arch/sgimips/sgimips/machdep.c   |  14 +++++---------
 5 files changed, 16 insertions(+), 26 deletions(-)

diffs (176 lines):

diff -r be6bc8c2a0f5 -r a806b27d972e sys/arch/sgimips/dev/crmfb.c
--- a/sys/arch/sgimips/dev/crmfb.c      Mon Dec 16 15:44:41 2013 +0000
+++ b/sys/arch/sgimips/dev/crmfb.c      Mon Dec 16 15:45:29 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crmfb.c,v 1.36 2012/01/11 16:18:30 macallan Exp $ */
+/* $NetBSD: crmfb.c,v 1.37 2013/12/16 15:45:29 mrg Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.36 2012/01/11 16:18:30 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crmfb.c,v 1.37 2013/12/16 15:45:29 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -419,13 +419,11 @@
 {
        struct vcons_data *vd;
        struct crmfb_softc *sc;
-       struct vcons_screen *ms;
        struct wsdisplay_fbinfo *wdf;
        int nmode;
 
        vd = (struct vcons_data *)v;
        sc = (struct crmfb_softc *)vd->cookie;
-       ms = (struct vcons_screen *)vd->active;
 
        switch (cmd) {
        case WSDISPLAYIO_GTYPE:
diff -r be6bc8c2a0f5 -r a806b27d972e sys/arch/sgimips/mace/mace.c
--- a/sys/arch/sgimips/mace/mace.c      Mon Dec 16 15:44:41 2013 +0000
+++ b/sys/arch/sgimips/mace/mace.c      Mon Dec 16 15:45:29 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mace.c,v 1.19 2012/10/27 17:18:10 chs Exp $    */
+/*     $NetBSD: mace.c,v 1.20 2013/12/16 15:45:29 mrg Exp $    */
 
 /*
  * Copyright (c) 2003 Christopher Sekiya
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.19 2012/10/27 17:18:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.20 2013/12/16 15:45:29 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -295,13 +295,11 @@
 void
 mace_intr(int irqs)
 {
-       uint64_t isa_irq, isa_mask;
+       uint64_t isa_irq;
        int i;
 
        /* irq 4 is the ISA cascade interrupt.  Must handle with care. */
        if (irqs & (1 << 4)) {
-               isa_mask = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(MACE_BASE
-                   + MACE_ISA_INT_MASK));
                isa_irq = mips3_ld((volatile uint64_t *)MIPS_PHYS_TO_KSEG1(MACE_BASE
                    + MACE_ISA_INT_STATUS));
                for (i = 0; i < MACE_NINTR; i++) {
diff -r be6bc8c2a0f5 -r a806b27d972e sys/arch/sgimips/mace/mcclock_mace.c
--- a/sys/arch/sgimips/mace/mcclock_mace.c      Mon Dec 16 15:44:41 2013 +0000
+++ b/sys/arch/sgimips/mace/mcclock_mace.c      Mon Dec 16 15:45:29 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mcclock_mace.c,v 1.14 2011/07/01 18:53:47 dyoung Exp $ */
+/*     $NetBSD: mcclock_mace.c,v 1.15 2013/12/16 15:45:29 mrg Exp $    */
 
 /*
  * Copyright (c) 2001 Antti Kantee.  All Rights Reserved.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.14 2011/07/01 18:53:47 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.15 2013/12/16 15:45:29 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -226,13 +226,12 @@
 void
 mcclock_poweroff(void)
 {
-       int s;
        uint8_t a, xctl_a, xctl_b;
 
        if (mace0 == NULL)
                return;
 
-       s = splhigh();
+       (void)splhigh();
        a = ds1687_read(mace0, DS1687_CONTROLA);
        a &= ~DS1687_DV2;
        a |= DS1687_DV1;
diff -r be6bc8c2a0f5 -r a806b27d972e sys/arch/sgimips/sgimips/autoconf.c
--- a/sys/arch/sgimips/sgimips/autoconf.c       Mon Dec 16 15:44:41 2013 +0000
+++ b/sys/arch/sgimips/sgimips/autoconf.c       Mon Dec 16 15:45:29 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.44 2012/10/27 17:18:10 chs Exp $        */
+/*     $NetBSD: autoconf.c,v 1.45 2013/12/16 15:45:29 mrg Exp $        */
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.44 2012/10/27 17:18:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.45 2013/12/16 15:45:29 mrg Exp $");
 
 #include "opt_ddb.h"
 
@@ -64,9 +64,8 @@
 void
 cpu_configure(void)
 {
-       int s;
 
-       s = splhigh();
+       (void)splhigh();
        if (config_rootfound("mainbus", NULL) == NULL)
                panic("no mainbus found");
 
diff -r be6bc8c2a0f5 -r a806b27d972e sys/arch/sgimips/sgimips/machdep.c
--- a/sys/arch/sgimips/sgimips/machdep.c        Mon Dec 16 15:44:41 2013 +0000
+++ b/sys/arch/sgimips/sgimips/machdep.c        Mon Dec 16 15:45:29 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.138 2012/10/27 17:18:10 chs Exp $        */
+/*     $NetBSD: machdep.c,v 1.139 2013/12/16 15:45:29 mrg Exp $        */
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.138 2012/10/27 17:18:10 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.139 2013/12/16 15:45:29 mrg Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -246,7 +246,6 @@
        const char *cpufreq, *osload;
        char *bootpath = NULL;
        vaddr_t kernend;
-       int kernstartpfn, kernendpfn;
        u_int i;
        int rv;
 #if NKSYMS > 0 || defined(DDB) || defined(MODULAR)
@@ -324,12 +323,6 @@
                kernend = mips_round_page(end);
        }
 
-       /* Leave 1 page before kernel untouched as that's where our initial
-        * kernel stack is */
-       /* XXX We could free it in cpu_startup() though XXX */
-       kernstartpfn = atop(MIPS_KSEG0_TO_PHYS((vaddr_t) kernel_text)) - 1;
-       kernendpfn = atop(MIPS_KSEG0_TO_PHYS(kernend));
-
        cpufreq = arcbios_GetEnvironmentVariable("cpufreq");
 
        if (cpufreq == 0)
@@ -630,6 +623,9 @@
        if (mem_cluster_cnt == 0)
                panic("no free memory descriptors found");
 
+       /* Leave 1 page before kernel untouched as that's where our initial
+        * kernel stack is */
+       /* XXX We could free it in cpu_startup() though XXX */
        mips_page_physload((vaddr_t)kernel_text - PAGE_SIZE, (vaddr_t)kernend,
            mem_clusters, mem_cluster_cnt, NULL, 0);
 



Home | Main Index | Thread Index | Old Index