Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hp700/hp700 de-__P, remove register, ansify.



details:   https://anonhg.NetBSD.org/src/rev/c7fdcd3bc398
branches:  trunk
changeset: 555641:c7fdcd3bc398
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Nov 24 02:51:35 2003 +0000

description:
de-__P, remove register, ansify.

diffstat:

 sys/arch/hp700/hp700/autoconf.c    |   62 ++++-------
 sys/arch/hp700/hp700/disksubr.c    |   94 +++++-----------
 sys/arch/hp700/hp700/intr.c        |   13 +-
 sys/arch/hp700/hp700/intr.h        |   20 +-
 sys/arch/hp700/hp700/machdep.c     |   87 ++++++---------
 sys/arch/hp700/hp700/machdep.h     |   10 +-
 sys/arch/hp700/hp700/mainbus.c     |  198 ++++++++++++++++--------------------
 sys/arch/hp700/hp700/sys_machdep.c |    9 +-
 8 files changed, 203 insertions(+), 290 deletions(-)

diffs (truncated from 1109 to 300 lines):

diff -r 5126b5b28179 -r c7fdcd3bc398 sys/arch/hp700/hp700/autoconf.c
--- a/sys/arch/hp700/hp700/autoconf.c   Mon Nov 24 01:59:59 2003 +0000
+++ b/sys/arch/hp700/hp700/autoconf.c   Mon Nov 24 02:51:35 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.11 2003/11/18 04:04:42 chs Exp $        */
+/*     $NetBSD: autoconf.c,v 1.12 2003/11/24 02:51:35 chs Exp $        */
 
 /*     $OpenBSD: autoconf.c,v 1.15 2001/06/25 00:43:10 mickey Exp $    */
 
@@ -86,7 +86,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.11 2003/11/18 04:04:42 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.12 2003/11/24 02:51:35 chs Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_useleds.h"
@@ -118,7 +118,7 @@
 #include <hp700/hp700/intr.h>
 #include <hp700/dev/cpudevs.h>
 
-void (*cold_hook) __P((void)); /* see below */
+void (*cold_hook)(void); /* see below */
 register_t     kpsw = PSW_Q | PSW_P | PSW_C | PSW_D;
 
 /*
@@ -127,7 +127,7 @@
 #ifdef USELEDS
 int _hp700_led_on_cycles[_HP700_LEDS_BLINKABLE];
 static struct callout hp700_led_callout;
-static void hp700_led_blinker __P((void *));
+static void hp700_led_blinker(void *);
 extern int hz;
 #endif
 
@@ -139,7 +139,7 @@
  * called at boot time, configure all devices on system
  */
 void
-cpu_configure()
+cpu_configure(void)
 {
 
        /*
@@ -213,8 +213,7 @@
  * This callout handler blinks LEDs.
  */
 static void
-hp700_led_blinker(arg)
-       void *arg;
+hp700_led_blinker(void *arg)
 {
        u_int led_cycle = (u_int) arg;
        int leds, led_i, led;
@@ -270,7 +269,7 @@
  * reduce the chance that swapping trashes it.
  */
 void
-cpu_dumpconf()
+cpu_dumpconf(void)
 {
        const struct bdevsw *bdev;
        extern int dumpsize;
@@ -310,11 +309,11 @@
 /****************************************************************/
 
 /* This takes the args: name, ctlr, unit */
-typedef struct device * (*findfunc_t) __P((char *, int, int));
+typedef struct device * (*findfunc_t)(char *, int, int);
 
-static struct device * find_dev_byname __P((char *));
-static struct device * net_find  __P((char *, int, int));
-static struct device * scsi_find __P((char *, int, int));
+static struct device * find_dev_byname(char *);
+static struct device * net_find(char *, int, int);
+static struct device * scsi_find(char *, int, int);
 
 struct prom_n2f {
        const char name[4];
@@ -332,7 +331,7 @@
  * Choose root and swap devices.
  */
 void
-cpu_rootconf()
+cpu_rootconf(void)
 {
        struct prom_n2f *nf;
        struct device *boot_device;
@@ -384,9 +383,7 @@
  * Network device:  Just use controller number.
  */
 static struct device *
-net_find(name, ctlr, unit)
-       char *name;
-       int ctlr, unit;
+net_find(char *name, int ctlr, int unit)
 {
        char tname[16];
 
@@ -400,9 +397,7 @@
  * scsibus number, and the unit number is (targ*8 + LUN).
  */
 static struct device *
-scsi_find(name, ctlr, unit)
-       char *name;
-       int ctlr, unit;
+scsi_find(char *name, int ctlr, int unit)
 {
        struct device *scsibus;
        struct scsibus_softc *sbsc;
@@ -429,9 +424,7 @@
 }
 #else
 static struct device *
-scsi_find(name, ctlr, unit)
-       char *name;
-       int ctlr, unit;
+scsi_find(char *name, int ctlr, int unit)
 {
 
        return (NULL);
@@ -443,13 +436,11 @@
  * XXX - Move this to some common file?
  */
 static struct device *
-find_dev_byname(name)
-       char *name;
+find_dev_byname(char *name)
 {
        struct device *dv;
 
-       for (dv = alldevs.tqh_first; dv != NULL;
-           dv = dv->dv_list.tqe_next) {
+       TAILQ_FOREACH(dv, &alldevs, dv_list) {
                if (!strcmp(dv->dv_xname, name)) {
                        return(dv);
                }
@@ -462,10 +453,8 @@
 #endif
 
 void
-pdc_scanbus_memory_map(self, ca, callback)
-       struct device *self;
-       struct confargs *ca;
-       void (*callback) __P((struct device *, struct confargs *));
+pdc_scanbus_memory_map(struct device *self, struct confargs *ca,
+    void (*callback)(struct device *, struct confargs *))
 {
        int i;
        struct confargs nca;
@@ -473,7 +462,7 @@
        struct pdc_iodc_read pdc_iodc_read PDC_ALIGNMENT;
 
        for (i = 0; i < 16; i++) {
-               bzero(&nca, sizeof(nca));
+               memset(&nca, 0, sizeof(nca));
                nca.ca_dp.dp_bc[0] = -1;
                nca.ca_dp.dp_bc[1] = -1;
                nca.ca_dp.dp_bc[2] = -1;
@@ -504,10 +493,8 @@
 }
 
 void
-pdc_scanbus_system_map(self, ca, callback)
-       struct device *self;
-       struct confargs *ca;
-       void (*callback) __P((struct device *, struct confargs *));
+pdc_scanbus_system_map(struct device *self, struct confargs *ca,
+    void (*callback)(struct device *, struct confargs *))
 {
        int i;
        int ia;
@@ -517,7 +504,7 @@
        struct pdc_system_map_find_addr pdc_find_addr PDC_ALIGNMENT;
 
        for (i = 0; i <= 64; i++) {
-               bzero(&nca, sizeof(nca));
+               memset(&nca, 0, sizeof(nca));
                nca.ca_dp.dp_bc[0] = ca->ca_dp.dp_bc[1];
                nca.ca_dp.dp_bc[1] = ca->ca_dp.dp_bc[2];
                nca.ca_dp.dp_bc[2] = ca->ca_dp.dp_bc[3];
@@ -570,8 +557,7 @@
 };
 
 const char *
-hppa_mod_info(type, sv)
-       int type, sv;
+hppa_mod_info(int type, int sv)
 {
        const struct hppa_mod_info *mi;
        static char fakeid[32];
diff -r 5126b5b28179 -r c7fdcd3bc398 sys/arch/hp700/hp700/disksubr.c
--- a/sys/arch/hp700/hp700/disksubr.c   Mon Nov 24 01:59:59 2003 +0000
+++ b/sys/arch/hp700/hp700/disksubr.c   Mon Nov 24 02:51:35 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.7 2003/11/01 18:23:37 matt Exp $        */
+/*     $NetBSD: disksubr.c,v 1.8 2003/11/24 02:51:35 chs Exp $ */
 
 /*     $OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $     */
 
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.7 2003/11/01 18:23:37 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.8 2003/11/24 02:51:35 chs Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -107,21 +107,21 @@
 #define        b_cylin b_resid
 
 #if defined(DISKLABEL_I386) || defined(DISKLABEL_ALPHA) || defined(DISKLABEL_AMIGA) || defined(DISKLABEL_HPPA) || defined(DISKLABEL_ALL)
-void   swapdisklabel __P((struct disklabel *d));
-char   *readbsdlabel __P((struct buf *, void (*) __P((struct buf *)), int, int,
-    int, int, struct disklabel *, int));
+void   swapdisklabel(struct disklabel *);
+char   *readbsdlabel(struct buf *, void (*)(struct buf *), int, int,
+    int, int, struct disklabel *, int);
 #endif
 #if defined(DISKLABEL_I386) || defined(DISKLABEL_ALL)
-char   *readdoslabel __P((struct buf *, void (*) __P((struct buf *)),
-    struct disklabel *, struct cpu_disklabel *, int *, int *, int));
+char   *readdoslabel(struct buf *, void (*)(struct buf *),
+    struct disklabel *, struct cpu_disklabel *, int *, int *, int);
 #endif
 #if defined(DISKLABEL_AMIGA) || defined(DISKLABEL_ALL)
-char   *readamigalabel __P((struct buf *, void (*) __P((struct buf *)),
-    struct disklabel *, struct cpu_disklabel *, int));
+char   *readamigalabel(struct buf *, void (*)(struct buf *),
+    struct disklabel *, struct cpu_disklabel *, int);
 #endif
 #if defined(DISKLABEL_HPPA) || defined(DISKLABEL_ALL)
-char   *readliflabel __P((struct buf *, void (*) __P((struct buf *)),
-    struct disklabel *, struct cpu_disklabel *, int *, int *, int));
+char   *readliflabel(struct buf *, void (*)(struct buf *),
+    struct disklabel *, struct cpu_disklabel *, int *, int *, int);
 #endif
 
 static enum disklabel_tag probe_order[] = { LABELPROBES, -1 };
@@ -132,8 +132,7 @@
  * Byteswap all the fields that might be swapped.
  */
 void
-swapdisklabel(dlp)
-       struct disklabel *dlp;
+swapdisklabel(struct disklabel *dlp)
 {
        int i;
        struct partition *pp;
@@ -183,12 +182,8 @@
  * Try to read a standard BSD disklabel at a certain sector.
  */
 char *
-readbsdlabel(bp, strat, cyl, sec, off, endian, lp, spoofonly)
-       struct buf *bp;
-       void (*strat) __P((struct buf *));
-       int cyl, sec, off, endian;
-       struct disklabel *lp;
-       int spoofonly;
+readbsdlabel(struct buf *bp, void (*strat)(struct buf *), int cyl, int sec,
+    int off, int endian, struct disklabel *lp, int spoofonly)
 {
        struct disklabel *dlp;
        char *msg = NULL;
@@ -267,11 +262,8 @@
  * Returns null on success and an error string on failure.
  */
 const char *
-readdisklabel(dev, strat, lp, osdep)
-       dev_t dev;
-       void (*strat) __P((struct buf *));
-       struct disklabel *lp;
-       struct cpu_disklabel *osdep;
+readdisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
+    struct cpu_disklabel *osdep)
 {
        int spoofonly = 0;
        struct buf *bp = NULL;
@@ -375,14 +367,8 @@
  * MBR is valid.
  */
 char *
-readdoslabel(bp, strat, lp, osdep, partoffp, cylp, spoofonly)
-       struct buf *bp;
-       void (*strat) __P((struct buf *));
-       struct disklabel *lp;
-       struct cpu_disklabel *osdep;
-       int *partoffp;
-       int *cylp;
-       int spoofonly;
+readdoslabel(struct buf *bp, void (*strat)(struct buf *), struct disklabel *lp,
+    struct cpu_disklabel *osdep, int *partoffp, int *cylp, int spoofonly)
 {
        struct dos_partition *dp = osdep->u._i386.dosparts, *dp2;
        struct dkbad *db, *bdp = &DKBAD(osdep);
@@ -429,7 +415,7 @@
                                        *partoffp = -1;
                                return (msg);



Home | Main Index | Thread Index | Old Index