Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/503339a68676
branches:  trunk
changeset: 569667:503339a68676
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Aug 28 19:11:19 2004 +0000

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

diffstat:

 sys/arch/hp300/hp300/autoconf.c       |  102 ++++++++++++------------------
 sys/arch/hp300/hp300/bus_space.c      |   47 +++----------
 sys/arch/hp300/hp300/clock.c          |   27 +++----
 sys/arch/hp300/hp300/disksubr.c       |   29 ++-----
 sys/arch/hp300/hp300/dkbad.c          |   10 +--
 sys/arch/hp300/hp300/hpux_machdep.c   |   40 +++--------
 sys/arch/hp300/hp300/intr.c           |   28 +++-----
 sys/arch/hp300/hp300/leds.c           |    9 +-
 sys/arch/hp300/hp300/machdep.c        |  115 ++++++++++++++-------------------
 sys/arch/hp300/hp300/mem.c            |   22 ++----
 sys/arch/hp300/hp300/pmap_bootstrap.c |    8 +-
 sys/arch/hp300/hp300/softintr.c       |    8 +-
 sys/arch/hp300/hp300/trap.c           |   64 ++++++------------
 13 files changed, 189 insertions(+), 320 deletions(-)

diffs (truncated from 1402 to 300 lines):

diff -r eeb1f0c008fb -r 503339a68676 sys/arch/hp300/hp300/autoconf.c
--- a/sys/arch/hp300/hp300/autoconf.c   Sat Aug 28 18:58:57 2004 +0000
+++ b/sys/arch/hp300/hp300/autoconf.c   Sat Aug 28 19:11:19 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.68 2003/11/17 14:37:59 tsutsui Exp $    */
+/*     $NetBSD: autoconf.c,v 1.69 2004/08/28 19:11:19 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc.
@@ -143,7 +143,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.68 2003/11/17 14:37:59 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.69 2004/08/28 19:11:19 thorpej Exp $");
 
 #include "hil.h"
 #include "dvbox.h"
@@ -214,8 +214,9 @@
 extern int topcatcnattach(bus_space_tag_t, bus_addr_t, int);
 extern int dnkbdcnattach(bus_space_tag_t, bus_addr_t);
 
-int dio_scan(int (*func)(bus_space_tag_t, bus_addr_t, int));
-int dio_scode_probe(int, int (*func)(bus_space_tag_t, bus_addr_t, int));
+static int     dio_scan(int (*func)(bus_space_tag_t, bus_addr_t, int));
+static int     dio_scode_probe(int,
+                   int (*func)(bus_space_tag_t, bus_addr_t, int));
 
 extern caddr_t internalhpib;
 extern char *extiobase;
@@ -278,29 +279,26 @@
        int                     dd_punit; /* and punit... */
 };
 typedef LIST_HEAD(, dev_data) ddlist_t;
-ddlist_t       dev_data_list;          /* all dev_datas */
-ddlist_t       dev_data_list_hpib;     /* hpib controller dev_datas */
-ddlist_t       dev_data_list_scsi;     /* scsi controller dev_datas */
+static ddlist_t        dev_data_list;          /* all dev_datas */
+static ddlist_t        dev_data_list_hpib;     /* hpib controller dev_datas */
+static ddlist_t        dev_data_list_scsi;     /* scsi controller dev_datas */
 
-void   findbootdev __P((void));
-void   findbootdev_slave __P((ddlist_t *, int, int, int));
-void   setbootdev __P((void));
+static void    findbootdev(void);
+static void    findbootdev_slave(ddlist_t *, int, int, int);
+static void    setbootdev(void);
 
-static struct dev_data *dev_data_lookup __P((struct device *));
-static void dev_data_insert __P((struct dev_data *, ddlist_t *));
+static struct dev_data *dev_data_lookup(struct device *);
+static void    dev_data_insert(struct dev_data *, ddlist_t *);
 
-int    mainbusmatch __P((struct device *, struct cfdata *, void *));
-void   mainbusattach __P((struct device *, struct device *, void *));
-int    mainbussearch __P((struct device *, struct cfdata *, void *));
+static int     mainbusmatch(struct device *, struct cfdata *, void *);
+static void    mainbusattach(struct device *, struct device *, void *);
+static int     mainbussearch(struct device *, struct cfdata *, void *);
 
 CFATTACH_DECL(mainbus, sizeof(struct device),
     mainbusmatch, mainbusattach, NULL, NULL);
 
-int
-mainbusmatch(parent, match, aux)
-       struct device *parent;
-       struct cfdata *match;
-       void *aux;
+static int
+mainbusmatch(struct device *parent, struct cfdata *match, void *aux)
 {
        static int mainbus_matched = 0;
 
@@ -312,10 +310,8 @@
        return (1);
 }
 
-void
-mainbusattach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
+static void
+mainbusattach(struct device *parent, struct device *self, void *aux)
 {
 
        printf("\n");
@@ -324,11 +320,8 @@
        config_search(mainbussearch, self, NULL);
 }
 
-int
-mainbussearch(parent, cf, aux)
-       struct device *parent;
-       struct cfdata *cf;
-       void *aux;
+static int
+mainbussearch(struct device *parent, struct cfdata *cf, void *aux)
 {
 
        if (config_match(parent, cf, NULL) > 0)
@@ -340,7 +333,7 @@
  * Determine the device configuration for the running system.
  */
 void
-cpu_configure()
+cpu_configure(void)
 {
 
        /*
@@ -369,7 +362,7 @@
  **********************************************************************/
 
 void
-cpu_rootconf()
+cpu_rootconf(void)
 {
        struct dev_data *dd;
        struct device *dv;
@@ -447,9 +440,7 @@
  * used to attach it.  This is used to find the boot device.
  */
 void
-device_register(dev, aux)
-       struct device *dev;
-       void *aux;
+device_register(struct device *dev, void *aux)
 {
        struct dev_data *dd;
        static int seen_netdevice = 0;
@@ -529,8 +520,8 @@
        }
 }
 
-void
-findbootdev()
+static void
+findbootdev(void)
 {
        int type, ctlr, slave, punit, part;
        int scsiboot, hpibboot, netboot;
@@ -626,10 +617,8 @@
                booted_partition = part;
 }
 
-void
-findbootdev_slave(ddlist, ctlr, slave, punit)
-       ddlist_t *ddlist;
-       int ctlr, slave, punit;
+static void
+findbootdev_slave(ddlist_t *ddlist, int ctlr, int slave, int punit)
 {
        struct dev_data *cdd, *dd;
 
@@ -670,8 +659,8 @@
        }
 }
 
-void
-setbootdev()
+static void
+setbootdev(void)
 {
        struct dev_data *cdd, *dd;
        int type, ctlr;
@@ -758,8 +747,7 @@
  * Return the dev_data corresponding to the given device.
  */
 static struct dev_data *
-dev_data_lookup(dev)
-       struct device *dev;
+dev_data_lookup(struct device *dev)
 {
        struct dev_data *dd;
 
@@ -774,9 +762,7 @@
  * Insert a dev_data into the provided list, sorted by select code.
  */
 static void
-dev_data_insert(dd, ddlist)
-       struct dev_data *dd;
-       ddlist_t *ddlist;
+dev_data_insert(struct dev_data *dd, ddlist_t *ddlist)
 {
        struct dev_data *de;
 
@@ -821,7 +807,7 @@
  **********************************************************************/
 
 void
-hp300_cninit()
+hp300_cninit(void)
 {
        struct bus_space_tag tag;
        bus_space_tag_t bst;
@@ -905,9 +891,8 @@
 #endif /* NITE */
 }
 
-int
-dio_scan(func)
-       int (*func)(bus_space_tag_t, bus_addr_t, int);
+static int
+dio_scan(int (*func)(bus_space_tag_t, bus_addr_t, int))
 {
 #ifndef CONSCODE
        int scode, sctop;
@@ -927,10 +912,9 @@
        return (1);
 }
 
-int
-dio_scode_probe(scode, func)
-       int scode;
-       int (*func)(bus_space_tag_t, bus_addr_t, int);
+static int
+dio_scode_probe(int scode,
+    int (*func)(bus_space_tag_t, bus_addr_t, int))
 {
        struct bus_space_tag tag;
        bus_space_tag_t bst;
@@ -976,9 +960,7 @@
  * space mapping the indicated physical address range [pa - pa+size)
  */
 caddr_t
-iomap(pa, size)
-       caddr_t pa;
-       int size;
+iomap(caddr_t pa, int size)
 {
        u_long kva;
        int error;
@@ -1002,9 +984,7 @@
  * Unmap a previously mapped device.
  */
 void
-iounmap(kva, size)
-       caddr_t kva;
-       int size;
+iounmap(caddr_t kva, int size)
 {
 
 #ifdef DEBUG
diff -r eeb1f0c008fb -r 503339a68676 sys/arch/hp300/hp300/bus_space.c
--- a/sys/arch/hp300/hp300/bus_space.c  Sat Aug 28 18:58:57 2004 +0000
+++ b/sys/arch/hp300/hp300/bus_space.c  Sat Aug 28 19:11:19 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_space.c,v 1.9 2003/11/17 14:37:59 tsutsui Exp $    */
+/*     $NetBSD: bus_space.c,v 1.10 2004/08/28 19:11:19 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.9 2003/11/17 14:37:59 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.10 2004/08/28 19:11:19 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -57,12 +57,8 @@
 
 /* ARGSUSED */
 int
-bus_space_map(t, bpa, size, flags, bshp)
-       bus_space_tag_t t;
-       bus_addr_t bpa;
-       bus_size_t size;
-       int flags;
-       bus_space_handle_t *bshp;
+bus_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags,
+    bus_space_handle_t *bshp)
 {
        vaddr_t kva;
        vsize_t offset;
@@ -105,14 +101,9 @@
 
 /* ARGSUSED */
 int
-bus_space_alloc(t, rstart, rend, size, alignment, boundary, flags,
-    bpap, bshp)
-       bus_space_tag_t t;
-       bus_addr_t rstart, rend;
-       bus_size_t size, alignment, boundary;
-       int flags;
-       bus_addr_t *bpap;
-       bus_space_handle_t *bshp;
+bus_space_alloc(bus_space_tag_t t, bus_addr_t rstart, bus_addr_t rend,
+    bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags,
+    bus_addr_t *bpap, bus_space_handle_t *bshp)
 {
 
        /*
@@ -123,10 +114,7 @@
 
 /* ARGSUSED */
 void
-bus_space_free(t, bsh, size)
-       bus_space_tag_t t;
-       bus_space_handle_t bsh;



Home | Main Index | Thread Index | Old Index