Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mipsco Deal with -Wstrict-prototypes -Wmissing-prot...



details:   https://anonhg.NetBSD.org/src/rev/f6469d12d93b
branches:  trunk
changeset: 499982:f6469d12d93b
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Dec 03 04:51:04 2000 +0000

description:
Deal with -Wstrict-prototypes -Wmissing-prototypes

diffstat:

 sys/arch/mipsco/include/prom.h     |    7 ++-
 sys/arch/mipsco/mipsco/mips_3x30.c |   19 +++---
 sys/arch/mipsco/mipsco/prom.c      |    8 +-
 sys/arch/mipsco/obio/asc.c         |  110 ++++++++++++++----------------------
 sys/arch/mipsco/obio/i82072.c      |   77 +++++++++++++++----------
 sys/arch/mipsco/obio/mkclock.c     |   13 ++-
 sys/arch/mipsco/obio/zs.c          |   14 ++--
 7 files changed, 125 insertions(+), 123 deletions(-)

diffs (truncated from 576 to 300 lines):

diff -r 8ac1b280b5fc -r f6469d12d93b sys/arch/mipsco/include/prom.h
--- a/sys/arch/mipsco/include/prom.h    Sun Dec 03 03:57:24 2000 +0000
+++ b/sys/arch/mipsco/include/prom.h    Sun Dec 03 04:51:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prom.h,v 1.4 2000/09/19 07:50:50 wdk Exp $     */
+/*     $NetBSD: prom.h,v 1.5 2000/12/03 04:51:04 matt Exp $    */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -318,4 +318,9 @@
 #define MIPS_PROM_NVGET                MIPS_PROM_ENTRY(53)
 #define MIPS_PROM_NVSET                MIPS_PROM_ENTRY(54)
 
+#ifdef _KERNEL
+extern void prom_init (void);
+extern int prom_getconsole (void);
+#endif
+
 #endif /* ! _MIPSCO_PROM_H */
diff -r 8ac1b280b5fc -r f6469d12d93b sys/arch/mipsco/mipsco/mips_3x30.c
--- a/sys/arch/mipsco/mipsco/mips_3x30.c        Sun Dec 03 03:57:24 2000 +0000
+++ b/sys/arch/mipsco/mipsco/mips_3x30.c        Sun Dec 03 04:51:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_3x30.c,v 1.3 2000/08/16 21:00:41 wdk Exp $        */
+/*     $NetBSD: mips_3x30.c,v 1.4 2000/12/03 04:51:04 matt Exp $       */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -49,16 +49,17 @@
 #include <machine/mainboard.h>
 #include <machine/sysconf.h>
 
-extern void MachFPInterrupt __P((u_int, u_int, u_int, struct frame *));
+extern void MachFPInterrupt (u_int, u_int, u_int, struct frame *);
 
 /* Local functions */
-void pizazz_intr __P((u_int, u_int, u_int, u_int));
-int  pizazz_level0_intr __P((void *));
-void pizazz_level5_intr __P((int, int, int));
-void pizazz_intr_establish  __P((int, int (*)(void *), void *));
+void pizazz_init (void);
+void pizazz_intr (u_int, u_int, u_int, u_int);
+int  pizazz_level0_intr (void *);
+void pizazz_level5_intr (int, int, int);
+void pizazz_intr_establish  (int, int (*)(void *), void *);
 
 void
-pizazz_init()
+pizazz_init(void)
 {
        platform.iobus = "obio";
        platform.cons_init = NULL;
@@ -87,7 +88,7 @@
 {
        /* handle clock interrupts ASAP */
        if (ipending & MIPS_INT_MASK_2) {               /* Timer Interrupt */
-               void rambo_clkintr __P((struct clockframe *));
+               void rambo_clkintr (struct clockframe *);
                struct clockframe cf;
                
                cf.pc = pc;
@@ -169,7 +170,7 @@
 void
 pizazz_intr_establish(level, func, arg)
        int level;
-       int (*func) __P((void *));
+       int (*func) (void *);
        void *arg;
 {
        if (level < 0 || level >= MAX_INTR_COOKIES)
diff -r 8ac1b280b5fc -r f6469d12d93b sys/arch/mipsco/mipsco/prom.c
--- a/sys/arch/mipsco/mipsco/prom.c     Sun Dec 03 03:57:24 2000 +0000
+++ b/sys/arch/mipsco/mipsco/prom.c     Sun Dec 03 04:51:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prom.c,v 1.2 2000/09/04 22:23:35 wdk Exp $     */
+/*     $NetBSD: prom.c,v 1.3 2000/12/03 04:51:04 matt Exp $    */
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -47,10 +47,10 @@
 
 struct mips_prom *callv;
 
-typedef void (*funcp_t)();
+typedef void (*funcp_t)(void);
 
 void
-prom_init()
+prom_init(void)
 {
        int i;
        funcp_t *fp;
@@ -67,7 +67,7 @@
  * port will be used for the console.
  */
 int
-prom_getconsole()
+prom_getconsole(void)
 {
        char *cp;
 
diff -r 8ac1b280b5fc -r f6469d12d93b sys/arch/mipsco/obio/asc.c
--- a/sys/arch/mipsco/obio/asc.c        Sun Dec 03 03:57:24 2000 +0000
+++ b/sys/arch/mipsco/obio/asc.c        Sun Dec 03 04:51:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asc.c,v 1.5 2000/09/04 22:28:53 wdk Exp $      */
+/*     $NetBSD: asc.c,v 1.6 2000/12/03 04:51:05 matt Exp $     */
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -80,8 +80,8 @@
         int                    dm_curseg;
 };
 
-static int     ascmatch  __P((struct device *, struct cfdata *, void *));
-static void    ascattach __P((struct device *, struct device *, void *));
+static int     ascmatch  (struct device *, struct cfdata *, void *);
+static void    ascattach (struct device *, struct device *, void *);
 
 struct cfattach asc_ca = {
        sizeof(struct asc_softc), ascmatch, ascattach
@@ -90,16 +90,16 @@
 /*
  * Functions and the switch for the MI code.
  */
-static u_char  asc_read_reg __P((struct ncr53c9x_softc *, int));
-static void    asc_write_reg __P((struct ncr53c9x_softc *, int, u_char));
-static int     asc_dma_isintr __P((struct ncr53c9x_softc *));
-static void    asc_dma_reset __P((struct ncr53c9x_softc *));
-static int     asc_dma_intr __P((struct ncr53c9x_softc *));
-static int     asc_dma_setup __P((struct ncr53c9x_softc *, caddr_t *,
-                                   size_t *, int, size_t *));
-static void    asc_dma_go __P((struct ncr53c9x_softc *));
-static void    asc_dma_stop __P((struct ncr53c9x_softc *));
-static int     asc_dma_isactive __P((struct ncr53c9x_softc *));
+static u_char  asc_read_reg (struct ncr53c9x_softc *, int);
+static void    asc_write_reg (struct ncr53c9x_softc *, int, u_char);
+static int     asc_dma_isintr (struct ncr53c9x_softc *);
+static void    asc_dma_reset (struct ncr53c9x_softc *);
+static int     asc_dma_intr (struct ncr53c9x_softc *);
+static int     asc_dma_setup (struct ncr53c9x_softc *, caddr_t *,
+                                   size_t *, int, size_t *);
+static void    asc_dma_go (struct ncr53c9x_softc *);
+static void    asc_dma_stop (struct ncr53c9x_softc *);
+static int     asc_dma_isactive (struct ncr53c9x_softc *);
 
 static struct ncr53c9x_glue asc_glue = {
        asc_read_reg,
@@ -114,25 +114,20 @@
        NULL,                   /* gl_clear_latched_intr */
 };
 
-static int     asc_intr __P((void *));
+static int     asc_intr (void *);
 
 #define MAX_SCSI_XFER   (64*1024)
 #define        MAX_DMA_SZ      MAX_SCSI_XFER
 #define        DMA_SEGS        (MAX_DMA_SZ/NBPG)
 
 static int
-ascmatch(parent, cf, aux)
-       struct device *parent;
-       struct cfdata *cf;
-       void *aux;
+ascmatch(struct device *parent, struct cfdata *cf, void *aux)
 {
        return 1;
 }
 
 static void
-ascattach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
+ascattach(struct device *parent, struct device *self, void *aux)
 {
        struct confargs *ca = aux;
        struct asc_softc *esc = (void *)self;
@@ -210,30 +205,24 @@
  * Glue functions.
  */
 
-u_char
-asc_read_reg(sc, reg)
-       struct ncr53c9x_softc *sc;
-       int reg;
+static u_char
+asc_read_reg(struct ncr53c9x_softc *sc, int reg)
 {
        struct asc_softc *esc = (struct asc_softc *)sc;
 
        return bus_space_read_1(esc->sc_bst, esc->sc_bsh, reg * 4 + 3);
 }
 
-void
-asc_write_reg(sc, reg, val)
-       struct ncr53c9x_softc *sc;
-       int reg;
-       u_char val;
+static void
+asc_write_reg(struct ncr53c9x_softc *sc, int reg, u_char val)
 {
        struct asc_softc *esc = (struct asc_softc *)sc;
 
        bus_space_write_1(esc->sc_bst, esc->sc_bsh, reg * 4 + 3, val);
 }
 
-void
-dma_status(sc)
-       struct ncr53c9x_softc *sc;
+static void
+dma_status(struct ncr53c9x_softc *sc)
 {
        struct asc_softc *esc = (struct asc_softc *)sc;
        int    count;
@@ -255,8 +244,7 @@
 }
 
 static __inline void
-check_fifo(esc)
-       struct asc_softc *esc;
+check_fifo(struct asc_softc *esc)
 {
        register int i=100;
        
@@ -271,16 +259,14 @@
        }
 }
 
-int
-asc_dma_isintr(sc)
-       struct ncr53c9x_softc *sc;
+static int
+asc_dma_isintr(struct ncr53c9x_softc *sc)
 {
        return NCR_READ_REG(sc, NCR_STAT) & NCRSTAT_INT;
 }
 
-void
-asc_dma_reset(sc)
-       struct ncr53c9x_softc *sc;
+static void
+asc_dma_reset(struct ncr53c9x_softc *sc)
 {
        struct asc_softc *esc = (struct asc_softc *)sc;
 
@@ -301,12 +287,8 @@
  */
 
 static int
-asc_dma_setup(sc, addr, len, datain, dmasize)
-       struct ncr53c9x_softc *sc;
-       caddr_t *addr;
-       size_t *len;
-       int datain;
-       size_t *dmasize;
+asc_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
+             int datain, size_t *dmasize)
 {
        struct asc_softc *esc = (struct asc_softc *)sc;
        paddr_t paddr;
@@ -332,10 +314,10 @@
                return 0;
 
        /* have dmamap for the transfering addresses */
-       if (err=bus_dmamap_load(esc->sc_dmat, esc->sc_dmamap,
+       if ((err=bus_dmamap_load(esc->sc_dmat, esc->sc_dmamap,
                                *esc->sc_dmaaddr, esc->sc_dmasize,
                                NULL /* kernel address */,   
-                               BUS_DMA_NOWAIT))
+                               BUS_DMA_NOWAIT)) != 0)
                panic("%s: bus_dmamap_load err=%d", sc->sc_dev.dv_xname, err);
 
        esc->sc_flags |= DMA_MAPLOADED;
@@ -388,9 +370,8 @@
        return 0;
 }
 
-void
-asc_dma_go(sc)
-       struct ncr53c9x_softc *sc;
+static void
+asc_dma_go(struct ncr53c9x_softc *sc)
 {
        struct asc_softc *esc = (struct asc_softc *)sc;
 
@@ -400,9 +381,8 @@
        esc->sc_flags |= DMA_ACTIVE;
 }
 
-int
-asc_dma_intr(sc)
-       struct ncr53c9x_softc *sc;
+static int
+asc_dma_intr(struct ncr53c9x_softc *sc)
 {
        struct asc_softc *esc = (struct asc_softc *)sc;
 
@@ -491,9 +471,8 @@
 }
 



Home | Main Index | Thread Index | Old Index