Deal with -Wstrict-prototypes -Wmissing-prototypes

This commit is contained in:
matt 2000-12-03 04:51:04 +00:00
parent 6944ee458a
commit bd338a518c
7 changed files with 126 additions and 124 deletions

View File

@ -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. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -318,4 +318,9 @@ extern void prom_init __P((void));
#define MIPS_PROM_NVGET MIPS_PROM_ENTRY(53) #define MIPS_PROM_NVGET MIPS_PROM_ENTRY(53)
#define MIPS_PROM_NVSET MIPS_PROM_ENTRY(54) #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 */ #endif /* ! _MIPSCO_PROM_H */

View File

@ -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. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -49,16 +49,17 @@
#include <machine/mainboard.h> #include <machine/mainboard.h>
#include <machine/sysconf.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 */ /* Local functions */
void pizazz_intr __P((u_int, u_int, u_int, u_int)); void pizazz_init (void);
int pizazz_level0_intr __P((void *)); void pizazz_intr (u_int, u_int, u_int, u_int);
void pizazz_level5_intr __P((int, int, int)); int pizazz_level0_intr (void *);
void pizazz_intr_establish __P((int, int (*)(void *), void *)); void pizazz_level5_intr (int, int, int);
void pizazz_intr_establish (int, int (*)(void *), void *);
void void
pizazz_init() pizazz_init(void)
{ {
platform.iobus = "obio"; platform.iobus = "obio";
platform.cons_init = NULL; platform.cons_init = NULL;
@ -87,7 +88,7 @@ pizazz_intr(status, cause, pc, ipending)
{ {
/* handle clock interrupts ASAP */ /* handle clock interrupts ASAP */
if (ipending & MIPS_INT_MASK_2) { /* Timer Interrupt */ if (ipending & MIPS_INT_MASK_2) { /* Timer Interrupt */
void rambo_clkintr __P((struct clockframe *)); void rambo_clkintr (struct clockframe *);
struct clockframe cf; struct clockframe cf;
cf.pc = pc; cf.pc = pc;
@ -169,7 +170,7 @@ pizazz_level5_intr(pc, cause, status)
void void
pizazz_intr_establish(level, func, arg) pizazz_intr_establish(level, func, arg)
int level; int level;
int (*func) __P((void *)); int (*func) (void *);
void *arg; void *arg;
{ {
if (level < 0 || level >= MAX_INTR_COOKIES) if (level < 0 || level >= MAX_INTR_COOKIES)

View File

@ -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. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -47,10 +47,10 @@ static struct mips_prom callvec;
struct mips_prom *callv; struct mips_prom *callv;
typedef void (*funcp_t)(); typedef void (*funcp_t)(void);
void void
prom_init() prom_init(void)
{ {
int i; int i;
funcp_t *fp; funcp_t *fp;
@ -67,7 +67,7 @@ prom_init()
* port will be used for the console. * port will be used for the console.
*/ */
int int
prom_getconsole() prom_getconsole(void)
{ {
char *cp; char *cp;

View File

@ -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. * Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
@ -80,8 +80,8 @@ struct asc_softc {
int dm_curseg; int dm_curseg;
}; };
static int ascmatch __P((struct device *, struct cfdata *, void *)); static int ascmatch (struct device *, struct cfdata *, void *);
static void ascattach __P((struct device *, struct device *, void *)); static void ascattach (struct device *, struct device *, void *);
struct cfattach asc_ca = { struct cfattach asc_ca = {
sizeof(struct asc_softc), ascmatch, ascattach sizeof(struct asc_softc), ascmatch, ascattach
@ -90,16 +90,16 @@ struct cfattach asc_ca = {
/* /*
* Functions and the switch for the MI code. * Functions and the switch for the MI code.
*/ */
static u_char asc_read_reg __P((struct ncr53c9x_softc *, int)); static u_char asc_read_reg (struct ncr53c9x_softc *, int);
static void asc_write_reg __P((struct ncr53c9x_softc *, int, u_char)); static void asc_write_reg (struct ncr53c9x_softc *, int, u_char);
static int asc_dma_isintr __P((struct ncr53c9x_softc *)); static int asc_dma_isintr (struct ncr53c9x_softc *);
static void asc_dma_reset __P((struct ncr53c9x_softc *)); static void asc_dma_reset (struct ncr53c9x_softc *);
static int asc_dma_intr __P((struct ncr53c9x_softc *)); static int asc_dma_intr (struct ncr53c9x_softc *);
static int asc_dma_setup __P((struct ncr53c9x_softc *, caddr_t *, static int asc_dma_setup (struct ncr53c9x_softc *, caddr_t *,
size_t *, int, size_t *)); size_t *, int, size_t *);
static void asc_dma_go __P((struct ncr53c9x_softc *)); static void asc_dma_go (struct ncr53c9x_softc *);
static void asc_dma_stop __P((struct ncr53c9x_softc *)); static void asc_dma_stop (struct ncr53c9x_softc *);
static int asc_dma_isactive __P((struct ncr53c9x_softc *)); static int asc_dma_isactive (struct ncr53c9x_softc *);
static struct ncr53c9x_glue asc_glue = { static struct ncr53c9x_glue asc_glue = {
asc_read_reg, asc_read_reg,
@ -114,25 +114,20 @@ static struct ncr53c9x_glue asc_glue = {
NULL, /* gl_clear_latched_intr */ NULL, /* gl_clear_latched_intr */
}; };
static int asc_intr __P((void *)); static int asc_intr (void *);
#define MAX_SCSI_XFER (64*1024) #define MAX_SCSI_XFER (64*1024)
#define MAX_DMA_SZ MAX_SCSI_XFER #define MAX_DMA_SZ MAX_SCSI_XFER
#define DMA_SEGS (MAX_DMA_SZ/NBPG) #define DMA_SEGS (MAX_DMA_SZ/NBPG)
static int static int
ascmatch(parent, cf, aux) ascmatch(struct device *parent, struct cfdata *cf, void *aux)
struct device *parent;
struct cfdata *cf;
void *aux;
{ {
return 1; return 1;
} }
static void static void
ascattach(parent, self, aux) ascattach(struct device *parent, struct device *self, void *aux)
struct device *parent, *self;
void *aux;
{ {
struct confargs *ca = aux; struct confargs *ca = aux;
struct asc_softc *esc = (void *)self; struct asc_softc *esc = (void *)self;
@ -210,30 +205,24 @@ ascattach(parent, self, aux)
* Glue functions. * Glue functions.
*/ */
u_char static u_char
asc_read_reg(sc, reg) asc_read_reg(struct ncr53c9x_softc *sc, int reg)
struct ncr53c9x_softc *sc;
int reg;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
return bus_space_read_1(esc->sc_bst, esc->sc_bsh, reg * 4 + 3); return bus_space_read_1(esc->sc_bst, esc->sc_bsh, reg * 4 + 3);
} }
void static void
asc_write_reg(sc, reg, val) asc_write_reg(struct ncr53c9x_softc *sc, int reg, u_char val)
struct ncr53c9x_softc *sc;
int reg;
u_char val;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
bus_space_write_1(esc->sc_bst, esc->sc_bsh, reg * 4 + 3, val); bus_space_write_1(esc->sc_bst, esc->sc_bsh, reg * 4 + 3, val);
} }
void static void
dma_status(sc) dma_status(struct ncr53c9x_softc *sc)
struct ncr53c9x_softc *sc;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
int count; int count;
@ -255,8 +244,7 @@ dma_status(sc)
} }
static __inline void static __inline void
check_fifo(esc) check_fifo(struct asc_softc *esc)
struct asc_softc *esc;
{ {
register int i=100; register int i=100;
@ -271,16 +259,14 @@ check_fifo(esc)
} }
} }
int static int
asc_dma_isintr(sc) asc_dma_isintr(struct ncr53c9x_softc *sc)
struct ncr53c9x_softc *sc;
{ {
return NCR_READ_REG(sc, NCR_STAT) & NCRSTAT_INT; return NCR_READ_REG(sc, NCR_STAT) & NCRSTAT_INT;
} }
void static void
asc_dma_reset(sc) asc_dma_reset(struct ncr53c9x_softc *sc)
struct ncr53c9x_softc *sc;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
@ -301,12 +287,8 @@ asc_dma_reset(sc)
*/ */
static int static int
asc_dma_setup(sc, addr, len, datain, dmasize) asc_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
struct ncr53c9x_softc *sc; int datain, size_t *dmasize)
caddr_t *addr;
size_t *len;
int datain;
size_t *dmasize;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
paddr_t paddr; paddr_t paddr;
@ -332,10 +314,10 @@ asc_dma_setup(sc, addr, len, datain, dmasize)
return 0; return 0;
/* have dmamap for the transfering addresses */ /* 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, *esc->sc_dmaaddr, esc->sc_dmasize,
NULL /* kernel address */, NULL /* kernel address */,
BUS_DMA_NOWAIT)) BUS_DMA_NOWAIT)) != 0)
panic("%s: bus_dmamap_load err=%d", sc->sc_dev.dv_xname, err); panic("%s: bus_dmamap_load err=%d", sc->sc_dev.dv_xname, err);
esc->sc_flags |= DMA_MAPLOADED; esc->sc_flags |= DMA_MAPLOADED;
@ -388,9 +370,8 @@ asc_dma_setup(sc, addr, len, datain, dmasize)
return 0; return 0;
} }
void static void
asc_dma_go(sc) asc_dma_go(struct ncr53c9x_softc *sc)
struct ncr53c9x_softc *sc;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
@ -400,9 +381,8 @@ asc_dma_go(sc)
esc->sc_flags |= DMA_ACTIVE; esc->sc_flags |= DMA_ACTIVE;
} }
int static int
asc_dma_intr(sc) asc_dma_intr(struct ncr53c9x_softc *sc)
struct ncr53c9x_softc *sc;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
@ -491,9 +471,8 @@ asc_dma_intr(sc)
} }
void static void
asc_dma_stop(sc) asc_dma_stop(struct ncr53c9x_softc *sc)
struct ncr53c9x_softc *sc;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
@ -503,17 +482,15 @@ asc_dma_stop(sc)
esc->sc_flags = DMA_IDLE; esc->sc_flags = DMA_IDLE;
} }
int static int
asc_dma_isactive(sc) asc_dma_isactive(struct ncr53c9x_softc *sc)
struct ncr53c9x_softc *sc;
{ {
struct asc_softc *esc = (struct asc_softc *)sc; struct asc_softc *esc = (struct asc_softc *)sc;
return (esc->sc_flags & DMA_ACTIVE)? 1 : 0; return (esc->sc_flags & DMA_ACTIVE)? 1 : 0;
} }
void static void
rambo_dma_chain(esc) rambo_dma_chain(struct asc_softc *esc)
struct asc_softc *esc;
{ {
int seg; int seg;
size_t count, blocks; size_t count, blocks;
@ -549,9 +526,8 @@ rambo_dma_chain(esc)
bus_space_write_2(esc->sc_bst, esc->dm_bsh, RAMBO_BLKCNT, blocks); bus_space_write_2(esc->sc_bst, esc->dm_bsh, RAMBO_BLKCNT, blocks);
} }
int static int
asc_intr(arg) asc_intr(void *arg)
void *arg;
{ {
register u_int32_t dma_stat; register u_int32_t dma_stat;
struct asc_softc *esc = arg; struct asc_softc *esc = arg;

View File

@ -1,4 +1,4 @@
/* $NetBSD: i82072.c,v 1.2 2000/08/15 04:56:46 wdk Exp $ */ /* $NetBSD: i82072.c,v 1.3 2000/12/03 04:51:05 matt Exp $ */
/*- /*-
* Copyright (c) 2000 The NetBSD Foundation, Inc. * Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
@ -41,12 +41,21 @@
#include <sys/syslog.h> #include <sys/syslog.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/device.h> #include <sys/device.h>
#include <sys/conf.h>
#include <machine/cpu.h> #include <machine/cpu.h>
#include <machine/autoconf.h> #include <machine/autoconf.h>
#include <machine/mainboard.h> #include <machine/mainboard.h>
#include <machine/bus.h> #include <machine/bus.h>
dev_type_open(fdopen);
dev_type_close(fdclose);
dev_type_ioctl(fdioctl);
dev_type_size(fdsize);
dev_type_dump(fddump);
dev_type_strategy(fdstrategy);
#define I82072_STATUS 0x000003 #define I82072_STATUS 0x000003
#define I82072_DATA 0x000007 #define I82072_DATA 0x000007
#define I82072_TC 0x800003 #define I82072_TC 0x800003
@ -59,29 +68,24 @@ struct fd_softc {
int unit; int unit;
}; };
static int fd_match __P((struct device *, struct cfdata *, void *)); static int fd_match (struct device *, struct cfdata *, void *);
static void fd_attach __P((struct device *, struct device *, void *)); static void fd_attach (struct device *, struct device *, void *);
static void fd_reset __P((struct fd_softc *)); static void fd_reset (struct fd_softc *);
struct cfattach fd_ca = { struct cfattach fd_ca = {
sizeof(struct fd_softc), fd_match, fd_attach sizeof(struct fd_softc), fd_match, fd_attach
}; };
static int fd_intr __P((void *)); static int fd_intr (void *);
int int
fd_match(parent, cf, aux) fd_match(struct device *parent, struct cfdata *cf, void *aux)
struct device *parent;
struct cfdata *cf;
void *aux;
{ {
return 1; return 1;
} }
void void
fd_attach(parent, self, aux) fd_attach(struct device *parent, struct device *self, void *aux)
struct device *parent, *self;
void *aux;
{ {
struct fd_softc *sc = (void *)self; struct fd_softc *sc = (void *)self;
struct confargs *ca = aux; struct confargs *ca = aux;
@ -104,8 +108,7 @@ fd_attach(parent, self, aux)
} }
void void
fd_reset(sc) fd_reset(struct fd_softc *sc)
struct fd_softc *sc;
{ {
/* This clears any pending interrupts from the i82072 FDC */ /* This clears any pending interrupts from the i82072 FDC */
bus_space_write_1(sc->fd_bst, sc->fd_bsh, I82072_STATUS, 0x80); bus_space_write_1(sc->fd_bst, sc->fd_bsh, I82072_STATUS, 0x80);
@ -114,29 +117,41 @@ fd_reset(sc)
DELAY(1000); DELAY(1000);
} }
void int
fdopen() fdopen(dev_t dev, int flags, int mode, struct proc *p)
{} {
return (EBADF);
}
int
fdclose(dev_t dev, int flags, int mode, struct proc *p)
{
return 0;
}
void void
fdclose() fdstrategy(struct buf *bp)
{} {
panic("fdstrategy");
}
void int
fdstrategy() fdioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{} {
return (EINVAL);
}
void int
fdioctl() fddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size)
{} {
return (ENODEV);
}
void int
fddump() fdsize(dev_t dev)
{} {
return (0);
void }
fdsize()
{}
static int static int
fd_intr(arg) fd_intr(arg)

View File

@ -1,4 +1,4 @@
/* $NetBSD: mkclock.c,v 1.1 2000/08/12 22:58:57 wdk Exp $ */ /* $NetBSD: mkclock.c,v 1.2 2000/12/03 04:51:05 matt Exp $ */
/*- /*-
* Copyright (c) 2000 The NetBSD Foundation, Inc. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -57,8 +57,8 @@ struct mkclock_softc {
bus_space_handle_t sc_bsh; bus_space_handle_t sc_bsh;
}; };
static int mkclock_match __P((struct device *, struct cfdata *, void *)); static int mkclock_match (struct device *, struct cfdata *, void *);
static void mkclock_attach __P((struct device *, struct device *, void *)); static void mkclock_attach (struct device *, struct device *, void *);
struct cfattach mkclock_ca = { struct cfattach mkclock_ca = {
sizeof(struct mkclock_softc), mkclock_match, mkclock_attach sizeof(struct mkclock_softc), mkclock_match, mkclock_attach
@ -66,8 +66,11 @@ struct cfattach mkclock_ca = {
static struct mkclock_softc *mk0; static struct mkclock_softc *mk0;
void mkclock_read __P((struct clock_ymdhms *)); void mkclock_read (struct clock_ymdhms *);
void mkclock_write __P((struct clock_ymdhms *)); void mkclock_write (struct clock_ymdhms *);
static int mk_read (struct mkclock_softc *, int);
static void mk_write (struct mkclock_softc *, int, int);
int int
mkclock_match(parent, cf, aux) mkclock_match(parent, cf, aux)

View File

@ -1,4 +1,4 @@
/* $NetBSD: zs.c,v 1.4 2000/08/29 11:25:08 wdk Exp $ */ /* $NetBSD: zs.c,v 1.5 2000/12/03 04:51:05 matt Exp $ */
/*- /*-
* Copyright (c) 1996, 2000 The NetBSD Foundation, Inc. * Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
@ -60,6 +60,7 @@
#include <machine/cpu.h> #include <machine/cpu.h>
#include <machine/mainboard.h> #include <machine/mainboard.h>
#include <machine/autoconf.h> #include <machine/autoconf.h>
#include <machine/prom.h>
#include <machine/z8530var.h> #include <machine/z8530var.h>
#include <dev/cons.h> #include <dev/cons.h>
@ -74,8 +75,6 @@
#define NZS 2 #define NZS 2
#endif #endif
extern void Debugger __P((void));
/* /*
* Some warts needed by z8530tty.c - * Some warts needed by z8530tty.c -
* The default parity REALLY needs to be the same as the PROM uses, * The default parity REALLY needs to be the same as the PROM uses,
@ -96,6 +95,10 @@ int zs_major = 1;
#define ZS_DELAY() delay(2); #define ZS_DELAY() delay(2);
static struct zschan *zs_get_chan_addr (int zs_unit, int channel);
static int zs_getc (void *);
static void zs_putc (void *, int);
/* The layout of this is hardware-dependent (padding, order). */ /* The layout of this is hardware-dependent (padding, order). */
struct zschan { struct zschan {
u_char pad1[3]; u_char pad1[3];
@ -135,7 +138,7 @@ static u_char zs_init_reg[16] = {
}; };
struct zschan * static struct zschan *
zs_get_chan_addr(zs_unit, channel) zs_get_chan_addr(zs_unit, channel)
int zs_unit, channel; int zs_unit, channel;
{ {
@ -596,7 +599,7 @@ zs_getc(arg)
/* /*
* Polled output char. * Polled output char.
*/ */
void static void
zs_putc(arg, c) zs_putc(arg, c)
void *arg; void *arg;
int c; int c;
@ -625,7 +628,6 @@ static void zscnputc __P((dev_t, int));
static void zscnpollc __P((dev_t, int)); static void zscnpollc __P((dev_t, int));
static int cons_port; static int cons_port;
extern int prom_getconsole __P((void));
struct consdev consdev_zs = { struct consdev consdev_zs = {
zscnprobe, zscnprobe,