Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/oea - remove set but unused variables



details:   https://anonhg.NetBSD.org/src/rev/69ae2b9d9403
branches:  trunk
changeset: 791080:69ae2b9d9403
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Nov 03 22:27:27 2013 +0000

description:
- remove set but unused variables
- move some variables inside their relevant use #ifdef

diffstat:

 sys/arch/powerpc/oea/cpu_subr.c       |  7 ++-----
 sys/arch/powerpc/oea/oea_machdep.c    |  8 +++++---
 sys/arch/powerpc/oea/ofwoea_machdep.c |  6 ++----
 3 files changed, 9 insertions(+), 12 deletions(-)

diffs (103 lines):

diff -r 0ede174f330d -r 69ae2b9d9403 sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c   Sun Nov 03 22:22:03 2013 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c   Sun Nov 03 22:27:27 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu_subr.c,v 1.79 2013/09/22 18:56:11 matt Exp $       */
+/*     $NetBSD: cpu_subr.c,v 1.80 2013/11/03 22:27:27 mrg Exp $        */
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.79 2013/09/22 18:56:11 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.80 2013/11/03 22:27:27 mrg Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_ppccache.h"
@@ -747,7 +747,6 @@
        u_int pvr, major, minor;
        uint16_t vers, rev, revfmt;
        const struct cputab *cp;
-       const char *name;
        size_t n;
 
        pvr = mfpvr();
@@ -780,9 +779,7 @@
        }
 
        revfmt = cp->revfmt;
-       name = cp->name;
        if (rev == MPC750 && pvr == 15) {
-               name = "755";
                revfmt = REVFMT_HEX;
        }
 
diff -r 0ede174f330d -r 69ae2b9d9403 sys/arch/powerpc/oea/oea_machdep.c
--- a/sys/arch/powerpc/oea/oea_machdep.c        Sun Nov 03 22:22:03 2013 +0000
+++ b/sys/arch/powerpc/oea/oea_machdep.c        Sun Nov 03 22:27:27 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: oea_machdep.c,v 1.67 2013/08/31 15:01:08 matt Exp $    */
+/*     $NetBSD: oea_machdep.c,v 1.68 2013/11/03 22:27:27 mrg Exp $     */
 
 /*
  * Copyright (C) 2002 Matt Thomas
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.67 2013/08/31 15:01:08 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.68 2013/11/03 22:27:27 mrg Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_compat_netbsd.h"
@@ -656,11 +656,13 @@
 oea_batinit(paddr_t pa, ...)
 {
        struct mem_region *allmem, *availmem, *mp;
-       unsigned int cpuvers;
        register_t msr = mfmsr();
        va_list ap;
+#ifdef PPC_OEA601
+       unsigned int cpuvers;
 
        cpuvers = mfpvr() >> 16;
+#endif /* PPC_OEA601 */
 
        /*
         * we need to call this before zapping BATs so OF calls work
diff -r 0ede174f330d -r 69ae2b9d9403 sys/arch/powerpc/oea/ofwoea_machdep.c
--- a/sys/arch/powerpc/oea/ofwoea_machdep.c     Sun Nov 03 22:22:03 2013 +0000
+++ b/sys/arch/powerpc/oea/ofwoea_machdep.c     Sun Nov 03 22:27:27 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.34 2013/08/31 07:33:15 matt Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.35 2013/11/03 22:27:27 mrg Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.34 2013/08/31 07:33:15 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.35 2013/11/03 22:27:27 mrg Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_compat_netbsd.h"
@@ -623,7 +623,6 @@
 {
        int i, cur, range, nrofholes, error;
        static int exmap=0;
-       u_int32_t addr;
        rangemap_t region, holes[32], list[32];
 
        memset(list, 0, sizeof(list));
@@ -697,7 +696,6 @@
                DPRINTF("addr=0x%x size=0x%x type=%d\n", list[i].addr,
                    list[i].size, list[i].type);
 
-       addr=0;
        range = find_lowest_range(list, cur, iomem);
        i = 0;
        nrofholes = 0;



Home | Main Index | Thread Index | Old Index