Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/ibm4xx Appease -Wshadow and -Wcast-qual



details:   https://anonhg.NetBSD.org/src/rev/d6e93be6f38b
branches:  trunk
changeset: 581626:d6e93be6f38b
user:      scw <scw%NetBSD.org@localhost>
date:      Fri Jun 03 11:59:17 2005 +0000

description:
Appease -Wshadow and -Wcast-qual

diffstat:

 sys/arch/powerpc/ibm4xx/cpu.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (46 lines):

diff -r 49abffeccc3f -r d6e93be6f38b sys/arch/powerpc/ibm4xx/cpu.c
--- a/sys/arch/powerpc/ibm4xx/cpu.c     Fri Jun 03 11:55:34 2005 +0000
+++ b/sys/arch/powerpc/ibm4xx/cpu.c     Fri Jun 03 11:59:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.18 2004/02/13 11:36:16 wiz Exp $     */
+/*     $NetBSD: cpu.c,v 1.19 2005/06/03 11:59:17 scw Exp $     */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.18 2004/02/13 11:36:16 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.19 2005/06/03 11:59:17 scw Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -50,7 +50,7 @@
 
 struct cputab {
        int version;
-       char *name;
+       const char *name;
 };
 static struct cputab models[] = {
        { PVR_401A1  >> 16,     "401A1" },
@@ -156,15 +156,15 @@
 void
 cpu_probe_cache()
 {
-       int version;
+       int pvr;
 
        /*
         * First we need to identify the CPU and determine the
         * cache line size, or things like memset/memcpy may lose
         * badly.
         */
-       __asm __volatile("mfpvr %0" : "=r" (version));
-       switch (version & 0xffff0000) {
+       __asm __volatile("mfpvr %0" : "=r" (pvr));
+       switch (pvr & 0xffff0000) {
        case PVR_401A1:
                curcpu()->ci_ci.dcache_size = 1024;
                curcpu()->ci_ci.dcache_line_size = 16;



Home | Main Index | Thread Index | Old Index