Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc Cleanup new warnings...



details:   https://anonhg.NetBSD.org/src/rev/18507fd3567a
branches:  trunk
changeset: 581674:18507fd3567a
user:      matt <matt%NetBSD.org@localhost>
date:      Fri Jun 03 18:19:11 2005 +0000

description:
Cleanup new warnings...

diffstat:

 sys/arch/macppc/macppc/autoconf.c |   6 +++---
 sys/arch/macppc/macppc/clock.c    |  16 ++++++++--------
 sys/arch/macppc/macppc/disksubr.c |  18 +++++++++---------
 sys/arch/macppc/macppc/extintr.c  |   8 ++++----
 sys/arch/macppc/macppc/machdep.c  |  10 +++++-----
 sys/arch/macppc/pci/pci_machdep.c |  15 ++++++++-------
 6 files changed, 37 insertions(+), 36 deletions(-)

diffs (290 lines):

diff -r 24516b205613 -r 18507fd3567a sys/arch/macppc/macppc/autoconf.c
--- a/sys/arch/macppc/macppc/autoconf.c Fri Jun 03 18:02:03 2005 +0000
+++ b/sys/arch/macppc/macppc/autoconf.c Fri Jun 03 18:19:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.42 2005/06/03 14:35:36 christos Exp $   */
+/*     $NetBSD: autoconf.c,v 1.43 2005/06/03 18:19:11 matt Exp $       */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.42 2005/06/03 14:35:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.43 2005/06/03 18:19:11 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -349,7 +349,7 @@
        va_list ap;
        int i;
        static struct {
-               char *name;
+               const char *name;
                int nargs;
                int nreturns;
                char *cmd;
diff -r 24516b205613 -r 18507fd3567a sys/arch/macppc/macppc/clock.c
--- a/sys/arch/macppc/macppc/clock.c    Fri Jun 03 18:02:03 2005 +0000
+++ b/sys/arch/macppc/macppc/clock.c    Fri Jun 03 18:19:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.24 2004/03/29 08:06:12 aymeric Exp $       */
+/*     $NetBSD: clock.c,v 1.25 2005/06/03 18:19:11 matt Exp $  */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.24 2004/03/29 08:06:12 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.25 2005/06/03 18:19:11 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -127,7 +127,7 @@
 {
        struct cpu_info * const ci = curcpu();
        u_long tb;
-       long tick;
+       long ticks;
        int nticks;
        int pri, msr;
 
@@ -141,10 +141,10 @@
         * Based on the actual time delay since the last decrementer reload,
         * we arrange for earlier interrupt next time.
         */
-       tick = mfspr(SPR_DEC);
-       for (nticks = 0; tick < 0; nticks++)
-               tick += ticks_per_intr;
-       mtspr(SPR_DEC, tick);
+       ticks = mfspr(SPR_DEC);
+       for (nticks = 0; ticks < 0; nticks++)
+               ticks += ticks_per_intr;
+       mtspr(SPR_DEC, ticks);
 
        uvmexp.intrs++;
        ci->ci_ev_clock.ev_count++;
@@ -161,7 +161,7 @@
                 * start of this tick interval.
                 */
                tb = mftbl();
-               ci->ci_lasttb = tb + tick - ticks_per_intr;
+               ci->ci_lasttb = tb + ticks - ticks_per_intr;
 
                /*
                 * Reenable interrupts
diff -r 24516b205613 -r 18507fd3567a sys/arch/macppc/macppc/disksubr.c
--- a/sys/arch/macppc/macppc/disksubr.c Fri Jun 03 18:02:03 2005 +0000
+++ b/sys/arch/macppc/macppc/disksubr.c Fri Jun 03 18:19:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.34 2004/11/08 17:36:07 mbw Exp $        */
+/*     $NetBSD: disksubr.c,v 1.35 2005/06/03 18:19:11 matt 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.34 2004/11/08 17:36:07 mbw Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.35 2005/06/03 18:19:11 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -133,9 +133,9 @@
                struct partition *, int));
 static int getNamedType __P((struct part_map_entry *, int,
                struct disklabel *, int, int, int *));
-static char *read_mac_label __P((dev_t, void (*)(struct buf *),
+static const char *read_mac_label __P((dev_t, void (*)(struct buf *),
                struct disklabel *, struct cpu_disklabel *));
-static char *read_dos_label __P((dev_t, void (*)(struct buf *),
+static const char *read_dos_label __P((dev_t, void (*)(struct buf *),
                struct disklabel *, struct cpu_disklabel *));
 static int get_netbsd_label __P((dev_t, void (*)(struct buf *),
                struct disklabel *, struct cpu_disklabel *));
@@ -328,7 +328,7 @@
  *     NetBSD to live on cluster 0--regardless of the actual order on the
  *     disk.  This whole algorithm should probably be changed in the future.
  */
-static char *
+static const char *
 read_mac_label(dev, strat, lp, osdep)
        dev_t dev;
        void (*strat)(struct buf *);
@@ -338,7 +338,7 @@
        struct part_map_entry *part;
        struct partition *pp;
        struct buf *bp;
-       char *msg = NULL;
+       const char *msg = NULL;
        int i, slot, maxslot = 0, clust;
        u_int8_t realtype;
 
@@ -405,7 +405,7 @@
  * Hence anything but DOS partitions is treated as unknown FS type, but
  * this should suffice to mount_msdos Zip and other removable media.
  */
-static char *
+static const char *
 read_dos_label(dev, strat, lp, osdep)
        dev_t dev;
        void (*strat)(struct buf *);
@@ -414,7 +414,7 @@
 {
        struct mbr_partition *dp;
        struct buf *bp;
-       char *msg = NULL;
+       const char *msg = NULL;
        int i, slot, maxslot = 0;
        u_int32_t bsdpartoff;
        struct mbr_partition *bsdp;
@@ -570,7 +570,7 @@
        struct cpu_disklabel *osdep;
 {
        struct buf *bp;
-       char *msg = NULL;
+       const char *msg = NULL;
 
        if (lp->d_secperunit == 0)
                lp->d_secperunit = 0x1fffffff;
diff -r 24516b205613 -r 18507fd3567a sys/arch/macppc/macppc/extintr.c
--- a/sys/arch/macppc/macppc/extintr.c  Fri Jun 03 18:02:03 2005 +0000
+++ b/sys/arch/macppc/macppc/extintr.c  Fri Jun 03 18:19:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extintr.c,v 1.51 2005/03/04 04:18:30 briggs Exp $      */
+/*     $NetBSD: extintr.c,v 1.52 2005/06/03 18:19:11 matt Exp $        */
 
 /*-
  * Copyright (c) 2000, 2001 Tsubai Masanari.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.51 2005/03/04 04:18:30 briggs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.52 2005/06/03 18:19:11 matt Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -440,7 +440,7 @@
 
 #define        LEGAL_IRQ(x)    ((x) >= 0 && (x) < NIRQ)
 
-char *
+const char *
 intr_typename(type)
        int type;
 {
@@ -627,7 +627,7 @@
                if (int_state == oint_state) {
                        if (spincount++ > 0x80) {
                                uint32_t        stuck;
-                               char            *comma="";
+                               const char      *comma="";
 
                                stuck = int_state;
                                printf("Disabling stuck interrupt(s): ");
diff -r 24516b205613 -r 18507fd3567a sys/arch/macppc/macppc/machdep.c
--- a/sys/arch/macppc/macppc/machdep.c  Fri Jun 03 18:02:03 2005 +0000
+++ b/sys/arch/macppc/macppc/machdep.c  Fri Jun 03 18:19:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.134 2005/01/23 19:10:23 chs Exp $        */
+/*     $NetBSD: machdep.c,v 1.135 2005/06/03 18:19:11 matt Exp $       */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.134 2005/01/23 19:10:23 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.135 2005/06/03 18:19:11 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -230,17 +230,17 @@
        for (i = 0; i < n; i++) {
                paddr_t pa = ofmap[i].pa;
                vaddr_t va = ofmap[i].va;
-               int len = ofmap[i].len;
+               size_t length = ofmap[i].len;
 
                if (va < 0xf0000000)                    /* XXX */
                        continue;
 
-               while (len > 0) {
+               while (length > 0) {
                        pmap_enter(&ofw_pmap, va, pa, VM_PROT_ALL,
                            VM_PROT_ALL|PMAP_WIRED);
                        pa += PAGE_SIZE;
                        va += PAGE_SIZE;
-                       len -= PAGE_SIZE;
+                       length -= PAGE_SIZE;
                }
        }
        pmap_update(&ofw_pmap);
diff -r 24516b205613 -r 18507fd3567a sys/arch/macppc/pci/pci_machdep.c
--- a/sys/arch/macppc/pci/pci_machdep.c Fri Jun 03 18:02:03 2005 +0000
+++ b/sys/arch/macppc/pci/pci_machdep.c Fri Jun 03 18:19:11 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.27 2004/12/07 15:42:08 briggs Exp $  */
+/*     $NetBSD: pci_machdep.c,v 1.28 2005/06/03 18:19:11 matt Exp $    */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.27 2004/12/07 15:42:08 briggs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.28 2005/06/03 18:19:11 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -395,13 +395,14 @@
        int match, i;
        u_int32_t map[160];
        const u_int32_t *mp;
-       u_int32_t imask[8], maskedaddr[8];
+       u_int32_t imapmask[8], maskedaddr[8];
        u_int32_t acells, icells;
        char name[32];
 
        parent = OF_parent(node);
        len = OF_getprop(parent, "interrupt-map", map, sizeof(map));
-       mlen = OF_getprop(parent, "interrupt-map-mask", imask, sizeof(imask));
+       mlen = OF_getprop(parent, "interrupt-map-mask", imapmask,
+           sizeof(imapmask));
 
        if (mlen != -1)
                memcpy(maskedaddr, addr, mlen);
@@ -410,7 +411,7 @@
                goto nomap;
 
 #ifdef DIAGNOSTIC
-       if (mlen == sizeof(imask)) {
+       if (mlen == sizeof(imapmask)) {
                printf("interrupt-map too long\n");
                return -1;
        }
@@ -418,7 +419,7 @@
 
        /* mask addr by "interrupt-map-mask" */
        for (i = 0; i < mlen / 4; i++)
-               maskedaddr[i] &= imask[i];
+               maskedaddr[i] &= imapmask[i];
 
        mp = map;
        i = 0;
@@ -461,7 +462,7 @@
                         * supplied address/interrupt via its map.
                         */
                        mlen = OF_getprop(iparent, "interrupt-map-mask",
-                           imask, sizeof(imask));
+                           imapmask, sizeof(imapmask));
 #ifdef DIAGNOSTIC
                        if (mlen != (acells + icells)*4) {
                                printf("interrupt-map inconsistent (%d, %d)\n",



Home | Main Index | Thread Index | Old Index