Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/dev Fix a ton of const/volatile issues shown ...



details:   https://anonhg.NetBSD.org/src/rev/0e74c3327fe3
branches:  trunk
changeset: 582027:0e74c3327fe3
user:      jmc <jmc%NetBSD.org@localhost>
date:      Mon Jun 13 21:34:16 2005 +0000

description:
Fix a ton of const/volatile issues shown with new warning flags

diffstat:

 sys/arch/amiga/dev/a2kbbc.c      |   8 ++++----
 sys/arch/amiga/dev/a34kbbc.c     |   8 ++++----
 sys/arch/amiga/dev/afsc.c        |   9 +++++----
 sys/arch/amiga/dev/bzivsc.c      |   6 +++---
 sys/arch/amiga/dev/bzsc.c        |   6 +++---
 sys/arch/amiga/dev/bztzsc.c      |   6 +++---
 sys/arch/amiga/dev/cbiisc.c      |   6 +++---
 sys/arch/amiga/dev/cbsc.c        |   6 +++---
 sys/arch/amiga/dev/clock.c       |   8 ++++----
 sys/arch/amiga/dev/drsupio.c     |   6 +++---
 sys/arch/amiga/dev/fd.c          |   8 ++++----
 sys/arch/amiga/dev/flsc.c        |  40 +++++++++++++++++++++-------------------
 sys/arch/amiga/dev/grf_cl.c      |   8 ++++----
 sys/arch/amiga/dev/grf_cv.c      |  10 +++++-----
 sys/arch/amiga/dev/grf_rh.c      |  36 +++++++++++++++++++++++-------------
 sys/arch/amiga/dev/grfabs_cc.c   |   6 +++---
 sys/arch/amiga/dev/grfabs_reg.h  |   6 +++---
 sys/arch/amiga/dev/hyper.c       |   8 ++++----
 sys/arch/amiga/dev/if_ed.c       |  10 +++++-----
 sys/arch/amiga/dev/if_es.c       |   8 ++++----
 sys/arch/amiga/dev/if_le.c       |  16 ++++++++--------
 sys/arch/amiga/dev/ioblix_zbus.c |   8 ++++----
 sys/arch/amiga/dev/isic_supio.c  |  14 +++++++-------
 sys/arch/amiga/dev/ite.c         |  40 ++++++++++++++++++++--------------------
 sys/arch/amiga/dev/ite_et.c      |  10 +++++-----
 sys/arch/amiga/dev/mfc.c         |  10 +++++-----
 sys/arch/amiga/dev/msc.c         |   6 +++---
 sys/arch/amiga/dev/repulse.c     |  10 +++++-----
 sys/arch/amiga/dev/sbic.c        |  10 +++++-----
 sys/arch/amiga/dev/sci.c         |   8 ++++----
 sys/arch/amiga/dev/siop.c        |  23 +++++++++++++----------
 sys/arch/amiga/dev/siop2.c       |  22 ++++++++++++----------
 sys/arch/amiga/dev/supio.h       |   4 ++--
 sys/arch/amiga/dev/wdc_amiga.c   |   6 +++---
 sys/arch/amiga/dev/wstsc.c       |  10 ++++++----
 sys/arch/amiga/dev/zbus.c        |  15 ++++++++-------
 36 files changed, 221 insertions(+), 200 deletions(-)

diffs (truncated from 1589 to 300 lines):

diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/a2kbbc.c
--- a/sys/arch/amiga/dev/a2kbbc.c       Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/a2kbbc.c       Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: a2kbbc.c,v 1.15 2003/08/07 16:26:39 agc Exp $ */
+/*     $NetBSD: a2kbbc.c,v 1.16 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: a2kbbc.c,v 1.15 2003/08/07 16:26:39 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a2kbbc.c,v 1.16 2005/06/13 21:34:16 jmc Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -123,7 +123,7 @@
            )
                return (0);
 
-       a2kclockaddr = (void *)ztwomap(0xdc0000);
+       a2kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc0000));
        if (a2kugettod(0) == 0)
                return (0);
 
@@ -138,7 +138,7 @@
 a2kbbc_attach(struct device *pdp, struct device *dp, void *auxp)
 {
        printf("\n");
-       a2kclockaddr = (void *)ztwomap(0xdc0000);
+       a2kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc0000));
 
        ugettod = a2kugettod;
        usettod = a2kusettod;
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/a34kbbc.c
--- a/sys/arch/amiga/dev/a34kbbc.c      Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/a34kbbc.c      Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: a34kbbc.c,v 1.13 2003/08/07 16:26:39 agc Exp $ */
+/*     $NetBSD: a34kbbc.c,v 1.14 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: a34kbbc.c,v 1.13 2003/08/07 16:26:39 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: a34kbbc.c,v 1.14 2005/06/13 21:34:16 jmc Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -119,7 +119,7 @@
        if (!(is_a3000() || is_a4000()))
                return(0);
 
-       a34kclockaddr = (void *)ztwomap(0xdc0000);
+       a34kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc0000));
        if (a34kugettod(0) == 0)
                return(0);
 
@@ -134,7 +134,7 @@
 a34kbbc_attach(struct device *pdp, struct device *dp, void *auxp)
 {
        printf("\n");
-       a34kclockaddr = (void *)ztwomap(0xdc0000);
+       a34kclockaddr = (void *)__UNVOLATILE(ztwomap(0xdc0000));
 
        ugettod = a34kugettod;
        usettod = a34kusettod;
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/afsc.c
--- a/sys/arch/amiga/dev/afsc.c Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/afsc.c Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: afsc.c,v 1.34 2004/03/28 18:59:39 mhitch Exp $ */
+/*     $NetBSD: afsc.c,v 1.35 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: afsc.c,v 1.34 2004/03/28 18:59:39 mhitch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: afsc.c,v 1.35 2005/06/13 21:34:16 jmc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -109,10 +109,11 @@
        zap = auxp;
        if (zap->manid == 514 && zap->prodid == 84)
                return(1);              /* It's an A4091 SCSI card */
-       if (!is_a4000() || !matchname(auxp, "afsc"))
+       if (!is_a4000() || !matchname("afsc", auxp))
                return(0);              /* Not on an A4000 or not A4000T SCSI */
        rp = ztwomap(0xdd0040);
-       if (badaddr((caddr_t)&rp->siop_scratch) || badaddr((caddr_t)&rp->siop_temp)) {
+       if (badaddr((caddr_t)__UNVOLATILE(&rp->siop_scratch)) || 
+           badaddr((caddr_t)__UNVOLATILE(&rp->siop_temp))) {
                return(0);
        }
        scratch = rp->siop_scratch;
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/bzivsc.c
--- a/sys/arch/amiga/dev/bzivsc.c       Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/bzivsc.c       Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bzivsc.c,v 1.16 2004/02/13 11:36:09 wiz Exp $ */
+/*     $NetBSD: bzivsc.c,v 1.17 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bzivsc.c,v 1.16 2004/02/13 11:36:09 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bzivsc.c,v 1.17 2005/06/13 21:34:16 jmc Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -139,7 +139,7 @@
        if (!is_a1200())
                return(0);                      /* And not A1200 */
        regs = &((volatile u_char *)zap->va)[0x8000];
-       if (badaddr((caddr_t)regs))
+       if (badaddr((caddr_t)__UNVOLATILE(regs)))
                return(0);
        regs[NCR_CFG1 * 4] = 0;
        regs[NCR_CFG1 * 4] = NCRCFG1_PARENB | 7;
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/bzsc.c
--- a/sys/arch/amiga/dev/bzsc.c Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/bzsc.c Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bzsc.c,v 1.34 2004/02/13 11:36:09 wiz Exp $ */
+/*     $NetBSD: bzsc.c,v 1.35 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bzsc.c,v 1.34 2004/02/13 11:36:09 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bzsc.c,v 1.35 2005/06/13 21:34:16 jmc Exp $");
 
 /*
  * Initial amiga Blizzard 1230-II driver by Daniel Widenfalk.  Conversion to
@@ -143,7 +143,7 @@
        if (!is_a1200())
                return(0);                      /* And not A1200 */
        regs = &((volatile u_char *)zap->va)[0x10000];
-       if (badaddr((caddr_t)regs))
+       if (badaddr((caddr_t)__UNVOLATILE(regs)))
                return(0);
        regs[NCR_CFG1 * 2] = 0;
        regs[NCR_CFG1 * 2] = NCRCFG1_PARENB | 7;
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/bztzsc.c
--- a/sys/arch/amiga/dev/bztzsc.c       Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/bztzsc.c       Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bztzsc.c,v 1.21 2004/02/13 11:36:09 wiz Exp $ */
+/*     $NetBSD: bztzsc.c,v 1.22 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bztzsc.c,v 1.21 2004/02/13 11:36:09 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bztzsc.c,v 1.22 2005/06/13 21:34:16 jmc Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -141,7 +141,7 @@
        if (zap->manid != 0x2140 || zap->prodid != 24)
                return(0);
        regs = &((volatile u_char *)zap->va)[0x1ff00];
-       if (badaddr((caddr_t)regs))
+       if (badaddr((caddr_t)__UNVOLATILE(regs)))
                return(0);
        regs[NCR_CFG1 * 4] = 0;
        regs[NCR_CFG1 * 4] = NCRCFG1_PARENB | 7;
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/cbiisc.c
--- a/sys/arch/amiga/dev/cbiisc.c       Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/cbiisc.c       Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cbiisc.c,v 1.17 2004/02/13 11:36:09 wiz Exp $ */
+/*     $NetBSD: cbiisc.c,v 1.18 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cbiisc.c,v 1.17 2004/02/13 11:36:09 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cbiisc.c,v 1.18 2005/06/13 21:34:16 jmc Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -135,7 +135,7 @@
        if (zap->manid != 0x2140 || zap->prodid != 25)
                return(0);
        regs = &((volatile u_char *)zap->va)[0x1ff03];
-       if (badaddr((caddr_t)regs))
+       if (badaddr((caddr_t)__UNVOLATILE(regs)))
                return(0);
        regs[NCR_CFG1 * 4] = 0;
        regs[NCR_CFG1 * 4] = NCRCFG1_PARENB | 7;
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/cbsc.c
--- a/sys/arch/amiga/dev/cbsc.c Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/cbsc.c Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cbsc.c,v 1.18 2004/02/13 11:36:10 wiz Exp $ */
+/*     $NetBSD: cbsc.c,v 1.19 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1997 Michael L. Hitch
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cbsc.c,v 1.18 2004/02/13 11:36:10 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cbsc.c,v 1.19 2005/06/13 21:34:16 jmc Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -139,7 +139,7 @@
        if (zap->prodid == 11 && iszthreepa(zap->pa))
                return(0);              /* Fastlane Z3! */
        regs = &((volatile u_char *)zap->va)[0xf400];
-       if (badaddr((caddr_t)regs))
+       if (badaddr((caddr_t)__UNVOLATILE(regs)))
                return(0);
        regs[NCR_CFG1 * 4] = 0;
        regs[NCR_CFG1 * 4] = NCRCFG1_PARENB | 7;
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/clock.c
--- a/sys/arch/amiga/dev/clock.c        Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/clock.c        Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.42 2003/08/07 16:26:40 agc Exp $ */
+/*     $NetBSD: clock.c,v 1.43 2005/06/13 21:34:16 jmc Exp $ */
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.42 2003/08/07 16:26:40 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.43 2005/06/13 21:34:16 jmc Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -148,7 +148,7 @@
 void
 clockattach(struct device *pdp, struct device *dp, void *auxp)
 {
-       char *clockchip;
+       const char *clockchip;
        unsigned short interval;
 #ifdef DRACO
        u_char dracorev;
@@ -321,7 +321,7 @@
 }
 
 void
-setstatclockrate(int hz)
+setstatclockrate(int hertz)
 {
 }
 
diff -r 81d6309e5774 -r 0e74c3327fe3 sys/arch/amiga/dev/drsupio.c
--- a/sys/arch/amiga/dev/drsupio.c      Mon Jun 13 21:33:15 2005 +0000
+++ b/sys/arch/amiga/dev/drsupio.c      Mon Jun 13 21:34:16 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drsupio.c,v 1.15 2003/04/01 21:26:31 thorpej Exp $ */
+/*     $NetBSD: drsupio.c,v 1.16 2005/06/13 21:34:16 jmc Exp $ */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drsupio.c,v 1.15 2003/04/01 21:26:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drsupio.c,v 1.16 2005/06/13 21:34:16 jmc Exp $");
 
 /*
  * DraCo multi-io chip bus space stuff
@@ -88,7 +88,7 @@
 }
 
 struct drsupio_devs {
-       char *name;
+       const char *name;
        int off;



Home | Main Index | Thread Index | Old Index