Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp300/dev Use ANSI function decls, static, and const.



details:   https://anonhg.NetBSD.org/src/rev/45a5f7e93d7f
branches:  trunk
changeset: 569663:45a5f7e93d7f
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Aug 28 17:37:00 2004 +0000

description:
Use ANSI function decls, static, and const.

diffstat:

 sys/arch/hp300/dev/com_dio.c      |   12 +-
 sys/arch/hp300/dev/com_dioreg.h   |    6 +-
 sys/arch/hp300/dev/com_diovar.h   |    9 +-
 sys/arch/hp300/dev/com_frodo.c    |   12 +-
 sys/arch/hp300/dev/com_frodovar.h |    9 +-
 sys/arch/hp300/dev/ct.c           |  158 +++++++++---------------
 sys/arch/hp300/dev/dcm.c          |  207 ++++++++++++--------------------
 sys/arch/hp300/dev/dio.c          |  162 +++++++++-----------------
 sys/arch/hp300/dev/diovar.h       |   10 +-
 sys/arch/hp300/dev/dma.c          |   54 +++-----
 sys/arch/hp300/dev/dmavar.h       |   18 +-
 sys/arch/hp300/dev/fhpib.c        |  109 +++++++----------
 sys/arch/hp300/dev/frodo.c        |  170 ++++++++++-----------------
 sys/arch/hp300/dev/frodovar.h     |   10 +-
 sys/arch/hp300/dev/grf.c          |  125 ++++++--------------
 sys/arch/hp300/dev/grf_dv.c       |  124 +++++++------------
 sys/arch/hp300/dev/grf_gb.c       |  127 +++++++------------
 sys/arch/hp300/dev/grf_hy.c       |  118 +++++++-----------
 sys/arch/hp300/dev/grf_rb.c       |  119 +++++++-----------
 sys/arch/hp300/dev/grf_subr.c     |   20 +-
 sys/arch/hp300/dev/grf_tc.c       |  132 ++++++++-------------
 sys/arch/hp300/dev/grfvar.h       |   40 +++---
 sys/arch/hp300/dev/hil.c          |  234 +++++++++++++------------------------
 sys/arch/hp300/dev/hilvar.h       |   32 ++--
 sys/arch/hp300/dev/hpib.c         |  132 +++++++-------------
 sys/arch/hp300/dev/hpibvar.h      |   62 ++++-----
 sys/arch/hp300/dev/if_le.c        |   45 ++----
 sys/arch/hp300/dev/intio.c        |   33 ++---
 sys/arch/hp300/dev/ite.c          |  184 ++++++++++-------------------
 sys/arch/hp300/dev/ite_subr.c     |   18 +-
 sys/arch/hp300/dev/itevar.h       |   44 +++---
 sys/arch/hp300/dev/mt.c           |  146 ++++++++--------------
 sys/arch/hp300/dev/nhpib.c        |  140 +++++++++-------------
 sys/arch/hp300/dev/ppi.c          |  109 ++++++-----------
 sys/arch/hp300/dev/rd.c           |  210 +++++++++++++--------------------
 sys/arch/hp300/dev/rd_compat.c    |   10 +-
 sys/arch/hp300/dev/rdvar.h        |    6 +-
 sys/arch/hp300/dev/rtc.c          |   27 +--
 sys/arch/hp300/dev/spc.c          |   48 ++----
 39 files changed, 1245 insertions(+), 1986 deletions(-)

diffs (truncated from 7021 to 300 lines):

diff -r 676d8f2fbd1c -r 45a5f7e93d7f sys/arch/hp300/dev/com_dio.c
--- a/sys/arch/hp300/dev/com_dio.c      Sat Aug 28 16:42:02 2004 +0000
+++ b/sys/arch/hp300/dev/com_dio.c      Sat Aug 28 17:37:00 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com_dio.c,v 1.1 2003/11/08 11:18:33 tsutsui Exp $      */
+/*     $NetBSD: com_dio.c,v 1.2 2004/08/28 17:37:00 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_dio.c,v 1.1 2003/11/08 11:18:33 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_dio.c,v 1.2 2004/08/28 17:37:00 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -94,8 +94,8 @@
        void    *sc_ih;                 /* interrupt handler */
 };
 
-int com_dio_match(struct device *, struct cfdata *, void *);
-void com_dio_attach(struct device *, struct device *, void *);
+static int     com_dio_match(struct device *, struct cfdata *, void *);
+static void    com_dio_attach(struct device *, struct device *, void *);
 
 CFATTACH_DECL(com_dio, sizeof(struct com_dio_softc),
     com_dio_match, com_dio_attach, NULL, NULL);
@@ -105,7 +105,7 @@
 
 #define CONMODE        ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) /* 8N1 */
 
-int
+static int
 com_dio_match(struct device *parent, struct cfdata *match, void *aux)
 {
        struct dio_attach_args *da = aux;
@@ -121,7 +121,7 @@
        return 0;
 }
 
-void
+static void
 com_dio_attach(struct device *parent, struct device *self, void *aux)
 {
        struct com_dio_softc *dsc = (void *)self;
diff -r 676d8f2fbd1c -r 45a5f7e93d7f sys/arch/hp300/dev/com_dioreg.h
--- a/sys/arch/hp300/dev/com_dioreg.h   Sat Aug 28 16:42:02 2004 +0000
+++ b/sys/arch/hp300/dev/com_dioreg.h   Sat Aug 28 17:37:00 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com_dioreg.h,v 1.1 2003/11/08 11:18:33 tsutsui Exp $   */
+/*     $NetBSD: com_dioreg.h,v 1.2 2004/08/28 17:37:00 thorpej Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -31,6 +31,8 @@
  *     @(#)dcareg.h    8.1 (Berkeley) 6/10/93
  */
 
+#ifndef _HP300_DEV_COM_DIOREG_H_
+#define        _HP300_DEV_COM_DIOREG_H_
 
 /* interface reset/id */
 #define DCA_ID         0x00                    /* read */
@@ -56,3 +58,5 @@
 
 /* clock frequency */
 #define COM_DIO_FREQ   2457600
+
+#endif /* _HP300_DEV_COM_DIOREG_H_ */
diff -r 676d8f2fbd1c -r 45a5f7e93d7f sys/arch/hp300/dev/com_diovar.h
--- a/sys/arch/hp300/dev/com_diovar.h   Sat Aug 28 16:42:02 2004 +0000
+++ b/sys/arch/hp300/dev/com_diovar.h   Sat Aug 28 17:37:00 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com_diovar.h,v 1.1 2003/11/08 11:18:33 tsutsui Exp $   */
+/*     $NetBSD: com_diovar.h,v 1.2 2004/08/28 17:37:00 thorpej Exp $   */
 /*
  * Copyright (c) 2003 Izumi Tsutsui.
  * All rights reserved.
@@ -26,4 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-int com_dio_cnattach(bus_space_tag_t, bus_addr_t, int);
+#ifndef _HP300_DEV_COM_DIOVAR_H_
+#define _HP300_DEV_COM_DIOVAR_H_
+
+int    com_dio_cnattach(bus_space_tag_t, bus_addr_t, int);
+
+#endif /* _HP300_DEV_COM_DIOVAR_H_ */
diff -r 676d8f2fbd1c -r 45a5f7e93d7f sys/arch/hp300/dev/com_frodo.c
--- a/sys/arch/hp300/dev/com_frodo.c    Sat Aug 28 16:42:02 2004 +0000
+++ b/sys/arch/hp300/dev/com_frodo.c    Sat Aug 28 17:37:00 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com_frodo.c,v 1.2 2004/04/10 07:51:15 tsutsui Exp $    */
+/*     $NetBSD: com_frodo.c,v 1.3 2004/08/28 17:37:00 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_frodo.c,v 1.2 2004/04/10 07:51:15 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_frodo.c,v 1.3 2004/08/28 17:37:00 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -92,8 +92,8 @@
        struct  com_softc sc_com;       /* real "com" softc */
 };
 
-int com_frodo_match(struct device *, struct cfdata *, void *);
-void com_frodo_attach(struct device *, struct device *, void *);
+static int     com_frodo_match(struct device *, struct cfdata *, void *);
+static void    com_frodo_attach(struct device *, struct device *, void *);
 
 CFATTACH_DECL(com_frodo, sizeof(struct com_frodo_softc),
     com_frodo_match, com_frodo_attach, NULL, NULL);
@@ -104,7 +104,7 @@
 #define CONMODE        ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) /* 8N1 */
 #define COM_FRODO_FREQ 8006400
 
-int
+static int
 com_frodo_match(struct device *parent, struct cfdata *match, void *aux)
 {
        struct frodo_attach_args *fa = aux;
@@ -122,7 +122,7 @@
        return 0;
 }
 
-void
+static void
 com_frodo_attach(struct device *parent, struct device *self, void *aux)
 {
        struct com_frodo_softc *fsc = (void *)self;
diff -r 676d8f2fbd1c -r 45a5f7e93d7f sys/arch/hp300/dev/com_frodovar.h
--- a/sys/arch/hp300/dev/com_frodovar.h Sat Aug 28 16:42:02 2004 +0000
+++ b/sys/arch/hp300/dev/com_frodovar.h Sat Aug 28 17:37:00 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: com_frodovar.h,v 1.1 2003/11/08 11:18:33 tsutsui Exp $ */
+/*     $NetBSD: com_frodovar.h,v 1.2 2004/08/28 17:37:00 thorpej Exp $ */
 /*
  * Copyright (c) 2003 Izumi Tsutsui.
  * All rights reserved.
@@ -26,4 +26,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-int com_frodo_cnattach(bus_space_tag_t, bus_addr_t, int);
+#ifndef _HP300_DEV_COM_FRODOVAR_H_
+#define        _HP300_DEV_COM_FRODOVAR_H_
+
+int    com_frodo_cnattach(bus_space_tag_t, bus_addr_t, int);
+
+#endif /* _HP300_DEV_COM_FRODOVAR_H_ */
diff -r 676d8f2fbd1c -r 45a5f7e93d7f sys/arch/hp300/dev/ct.c
--- a/sys/arch/hp300/dev/ct.c   Sat Aug 28 16:42:02 2004 +0000
+++ b/sys/arch/hp300/dev/ct.c   Sat Aug 28 17:37:00 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ct.c,v 1.37 2003/11/17 14:37:59 tsutsui Exp $  */
+/*     $NetBSD: ct.c,v 1.38 2004/08/28 17:37:00 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.37 2003/11/17 14:37:59 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ct.c,v 1.38 2004/08/28 17:37:00 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -143,20 +143,20 @@
 #define CTF_CANSTREAM  0x200
 #define        CTF_WRTTN       0x400
 
-int    ctmatch __P((struct device *, struct cfdata *, void *));
-void   ctattach __P((struct device *, struct device *, void *));
+static int     ctmatch(struct device *, struct cfdata *, void *);
+static void    ctattach(struct device *, struct device *, void *);
 
 CFATTACH_DECL(ct, sizeof(struct ct_softc),
     ctmatch, ctattach, NULL, NULL);
 
 extern struct cfdriver ct_cd;
 
-dev_type_open(ctopen);
-dev_type_close(ctclose);
-dev_type_read(ctread);
-dev_type_write(ctwrite);
-dev_type_ioctl(ctioctl);
-dev_type_strategy(ctstrategy);
+static dev_type_open(ctopen);
+static dev_type_close(ctclose);
+static dev_type_read(ctread);
+static dev_type_write(ctwrite);
+static dev_type_ioctl(ctioctl);
+static dev_type_strategy(ctstrategy);
 
 const struct bdevsw ct_bdevsw = {
        ctopen, ctclose, ctstrategy, ctioctl, nodump, nosize, D_TAPE
@@ -167,22 +167,22 @@
        nostop, notty, nopoll, nommap, nokqfilter, D_TAPE
 };
 
-int    ctident __P((struct device *, struct ct_softc *,
-           struct hpibbus_attach_args *));
+static int     ctident(struct device *, struct ct_softc *,
+                   struct hpibbus_attach_args *);
 
-void   ctreset __P((struct ct_softc *));
-void   ctaddeof __P((struct ct_softc *));
-void   ctustart __P((struct ct_softc *));
-void   cteof __P((struct ct_softc *, struct buf *));
-void   ctdone __P((struct ct_softc *, struct buf *));
+static void    ctreset(struct ct_softc *);
+static void    ctaddeof(struct ct_softc *);
+static void    ctustart(struct ct_softc *);
+static void    cteof(struct ct_softc *, struct buf *);
+static void    ctdone(struct ct_softc *, struct buf *);
 
-void   ctstart __P((void *));
-void   ctgo __P((void *));
-void   ctintr __P((void *));
+static void    ctstart(void *);
+static void    ctgo(void *);
+static void    ctintr(void *);
 
-void   ctcommand __P((dev_t, int, int));
+static void    ctcommand(dev_t, int, int);
 
-struct ctinfo {
+static const struct ctinfo {
        short   hwid;
        short   punit;
        char    *desc;
@@ -194,7 +194,7 @@
        { CT9145ID,     0,      "9145"  },
        { CT35401ID,    0,      "35401A"},
 };
-int    nctinfo = sizeof(ctinfo) / sizeof(ctinfo[0]);
+static const int nctinfo = sizeof(ctinfo) / sizeof(ctinfo[0]);
 
 #define        CT_NOREW        4
 #define        CT_STREAM       8
@@ -207,21 +207,16 @@
 #define CT_BSF         0x02
 #endif
 
-int
-ctmatch(parent, match, aux)
-       struct device *parent;
-       struct cfdata *match;
-       void *aux;
+static int
+ctmatch(struct device *parent, struct cfdata *match, void *aux)
 {
        struct hpibbus_attach_args *ha = aux;
 
        return (ctident(parent, NULL, ha));
 }
 
-void
-ctattach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
+static void
+ctattach(struct device *parent, struct device *self, void *aux)
 {
        struct ct_softc *sc = (struct ct_softc *)self;
        struct hpibbus_attach_args *ha = aux;
@@ -248,11 +243,9 @@
        sc->sc_flags |= CTF_ALIVE;
 }
 
-int
-ctident(parent, sc, ha)
-       struct device *parent;
-       struct ct_softc *sc;
-       struct hpibbus_attach_args *ha;
+static int
+ctident(struct device *parent, struct ct_softc *sc,
+    struct hpibbus_attach_args *ha)
 {
        struct ct_describe desc;
        u_char stat, cmd[3];
@@ -322,9 +315,8 @@
        return (1);
 }
 
-void
-ctreset(sc)
-       struct ct_softc *sc;
+static void
+ctreset(struct ct_softc *sc)
 {



Home | Main Index | Thread Index | Old Index