diff options
| author | matt <matt@NetBSD.org> | 2001-08-26 02:49:18 +0000 |
|---|---|---|
| committer | matt <matt@NetBSD.org> | 2001-08-26 02:49:18 +0000 |
| commit | 5911b9a67fba46a3e1cf4bddfc97409f47825fc7 (patch) | |
| tree | 2e54f5471607e740fc07c71cd588755f2bc827c6 /sys/dev/ofw | |
| parent | 449a75885045e13aebf48268b37ea0caae4cc35f (diff) | |
Make compile with -Wmissing-prototype -Wstrict-prototypes
Diffstat (limited to 'sys/dev/ofw')
| -rw-r--r-- | sys/dev/ofw/ofdisk.c | 71 | ||||
| -rw-r--r-- | sys/dev/ofw/ofnet.c | 76 | ||||
| -rw-r--r-- | sys/dev/ofw/ofrtc.c | 40 |
3 files changed, 55 insertions, 132 deletions
diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c index 3a123759b22..5a13622a238 100644 --- a/sys/dev/ofw/ofdisk.c +++ b/sys/dev/ofw/ofdisk.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofdisk.c,v 1.16 2001/08/25 19:05:04 matt Exp $ */ +/* $NetBSD: ofdisk.c,v 1.17 2001/08/26 02:49:18 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -62,8 +62,8 @@ cdev_decl(ofdisk_); /* sc_flags */ #define OFDF_ISFLOPPY 0x01 /* we are a floppy drive */ -static int ofdisk_match __P((struct device *, struct cfdata *, void *)); -static void ofdisk_attach __P((struct device *, struct device *, void *)); +static int ofdisk_match (struct device *, struct cfdata *, void *); +static void ofdisk_attach (struct device *, struct device *, void *); struct cfattach ofdisk_ca = { sizeof(struct ofdisk_softc), ofdisk_match, ofdisk_attach @@ -71,18 +71,15 @@ struct cfattach ofdisk_ca = { extern struct cfdriver ofdisk_cd; -void ofdisk_strategy __P((struct buf *)); +void ofdisk_strategy (struct buf *); struct dkdriver ofdisk_dkdriver = { ofdisk_strategy }; -void ofdisk_getdefaultlabel __P((struct ofdisk_softc *, struct disklabel *)); -void ofdisk_getdisklabel __P((dev_t)); +void ofdisk_getdefaultlabel (struct ofdisk_softc *, struct disklabel *); +void ofdisk_getdisklabel (dev_t); static int -ofdisk_match(parent, match, aux) - struct device *parent; - struct cfdata *match; - void *aux; +ofdisk_match(struct device *parent, struct cfdata *match, void *aux) { struct ofbus_attach_args *oba = aux; char type[8]; @@ -100,9 +97,7 @@ ofdisk_match(parent, match, aux) } static void -ofdisk_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +ofdisk_attach(struct device *parent, struct device *self, void *aux) { struct ofdisk_softc *of = (void *)self; struct ofbus_attach_args *oba = aux; @@ -134,11 +129,7 @@ ofdisk_attach(parent, self, aux) } int -ofdisk_open(dev, flags, fmt, p) - dev_t dev; - int flags; - int fmt; - struct proc *p; +ofdisk_open(dev_t dev, int flags, int fmt, struct proc *p) { int unit = DISKUNIT(dev); struct ofdisk_softc *of; @@ -201,11 +192,7 @@ ofdisk_open(dev, flags, fmt, p) } int -ofdisk_close(dev, flags, fmt, p) - dev_t dev; - int flags; - int fmt; - struct proc *p; +ofdisk_close(dev_t dev, int flags, int fmt, struct proc *p) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(dev)]; @@ -234,8 +221,7 @@ ofdisk_close(dev, flags, fmt, p) } void -ofdisk_strategy(bp) - struct buf *bp; +ofdisk_strategy(struct buf *bp) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(bp->b_dev)]; struct partition *p; @@ -283,8 +269,7 @@ done: } static void -ofminphys(bp) - struct buf *bp; +ofminphys(struct buf *bp) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(bp->b_dev)]; @@ -293,30 +278,19 @@ ofminphys(bp) } int -ofdisk_read(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; +ofdisk_read(dev_t dev, struct uio *uio, int flags) { return physio(ofdisk_strategy, NULL, dev, B_READ, ofminphys, uio); } int -ofdisk_write(dev, uio, flags) - dev_t dev; - struct uio *uio; - int flags; +ofdisk_write(dev_t dev, struct uio *uio, int flags) { return physio(ofdisk_strategy, NULL, dev, B_WRITE, ofminphys, uio); } int -ofdisk_ioctl(dev, cmd, data, flag, p) - dev_t dev; - u_long cmd; - caddr_t data; - int flag; - struct proc *p; +ofdisk_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { struct ofdisk_softc *of = ofdisk_cd.cd_devs[DISKUNIT(dev)]; int error; @@ -397,18 +371,13 @@ ofdisk_ioctl(dev, cmd, data, flag, p) } int -ofdisk_dump(dev, blkno, va, size) - dev_t dev; - daddr_t blkno; - caddr_t va; - size_t size; +ofdisk_dump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) { return EINVAL; } int -ofdisk_size(dev) - dev_t dev; +ofdisk_size(dev_t dev) { struct ofdisk_softc *of; struct disklabel *lp; @@ -439,12 +408,10 @@ ofdisk_size(dev) } void -ofdisk_getdefaultlabel(of, lp) - struct ofdisk_softc *of; - struct disklabel *lp; +ofdisk_getdefaultlabel(struct ofdisk_softc *of, struct disklabel *lp) { - bzero(lp, sizeof *lp); + memset(lp, 0, sizeof *lp); /* * XXX Firmware bug? Asking for block size gives a diff --git a/sys/dev/ofw/ofnet.c b/sys/dev/ofw/ofnet.c index f27330f345e..1ca58e3ba7a 100644 --- a/sys/dev/ofw/ofnet.c +++ b/sys/dev/ofw/ofnet.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofnet.c,v 1.20 2000/11/15 01:02:18 thorpej Exp $ */ +/* $NetBSD: ofnet.c,v 1.21 2001/08/26 02:49:18 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -38,6 +38,7 @@ #include <sys/systm.h> #include <sys/callout.h> #include <sys/device.h> +#include <sys/disk.h> #include <sys/ioctl.h> #include <sys/mbuf.h> #include <sys/socket.h> @@ -69,7 +70,7 @@ struct cfattach ipkdb_ofn_ca = { static struct ipkdb_if *kifp; static struct ofnet_softc *ipkdb_of; -static int ipkdbprobe __P((struct cfdata *, void *)); +static int ipkdbprobe (struct cfdata *, void *); #endif struct ofnet_softc { @@ -80,27 +81,24 @@ struct ofnet_softc { struct callout sc_callout; }; -static int ofnet_match __P((struct device *, struct cfdata *, void *)); -static void ofnet_attach __P((struct device *, struct device *, void *)); +static int ofnet_match (struct device *, struct cfdata *, void *); +static void ofnet_attach (struct device *, struct device *, void *); struct cfattach ofnet_ca = { sizeof(struct ofnet_softc), ofnet_match, ofnet_attach }; -static void ofnet_read __P((struct ofnet_softc *)); -static void ofnet_timer __P((void *)); -static void ofnet_init __P((struct ofnet_softc *)); -static void ofnet_stop __P((struct ofnet_softc *)); +static void ofnet_read (struct ofnet_softc *); +static void ofnet_timer (void *); +static void ofnet_init (struct ofnet_softc *); +static void ofnet_stop (struct ofnet_softc *); -static void ofnet_start __P((struct ifnet *)); -static int ofnet_ioctl __P((struct ifnet *, u_long, caddr_t)); -static void ofnet_watchdog __P((struct ifnet *)); +static void ofnet_start (struct ifnet *); +static int ofnet_ioctl (struct ifnet *, u_long, caddr_t); +static void ofnet_watchdog (struct ifnet *); static int -ofnet_match(parent, match, aux) - struct device *parent; - struct cfdata *match; - void *aux; +ofnet_match(struct device *parent, struct cfdata *match, void *aux) { struct ofbus_attach_args *oba = aux; char type[32]; @@ -124,9 +122,7 @@ ofnet_match(parent, match, aux) } static void -ofnet_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +ofnet_attach(struct device *parent, struct device *self, void *aux) { struct ofnet_softc *of = (void *)self; struct ifnet *ifp = &of->sc_ethercom.ec_if; @@ -174,8 +170,7 @@ ofnet_attach(parent, self, aux) static char buf[ETHERMTU + sizeof(struct ether_header)]; static void -ofnet_read(of) - struct ofnet_softc *of; +ofnet_read(struct ofnet_softc *of) { struct ifnet *ifp = &of->sc_ethercom.ec_if; struct mbuf *m, **mp, *head; @@ -278,8 +273,7 @@ ofnet_timer(arg) } static void -ofnet_init(of) - struct ofnet_softc *of; +ofnet_init(struct ofnet_softc *of) { struct ifnet *ifp = &of->sc_ethercom.ec_if; @@ -294,16 +288,14 @@ ofnet_init(of) } static void -ofnet_stop(of) - struct ofnet_softc *of; +ofnet_stop(struct ofnet_softc *of) { callout_stop(&of->sc_callout); of->sc_ethercom.ec_if.if_flags &= ~IFF_RUNNING; } static void -ofnet_start(ifp) - struct ifnet *ifp; +ofnet_start(struct ifnet *ifp) { struct ofnet_softc *of = ifp->if_softc; struct mbuf *m, *m0; @@ -338,7 +330,7 @@ ofnet_start(ifp) continue; } - for (bufp = buf; m = m0;) { + for (bufp = buf; (m = m0) != NULL;) { bcopy(mtod(m, char *), bufp, m->m_len); bufp += m->m_len; MFREE(m, m0); @@ -351,14 +343,11 @@ ofnet_start(ifp) } static int -ofnet_ioctl(ifp, cmd, data) - struct ifnet *ifp; - u_long cmd; - caddr_t data; +ofnet_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct ofnet_softc *of = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; - struct ifreq *ifr = (struct ifreq *)data; + /* struct ifreq *ifr = (struct ifreq *)data; */ int error = 0; switch (cmd) { @@ -397,8 +386,7 @@ ofnet_ioctl(ifp, cmd, data) } static void -ofnet_watchdog(ifp) - struct ifnet *ifp; +ofnet_watchdog(struct ifnet *ifp) { struct ofnet_softc *of = ifp->if_softc; @@ -410,8 +398,7 @@ ofnet_watchdog(ifp) #if NIPKDB_OFN > 0 static void -ipkdbofstart(kip) - struct ipkdb_if *kip; +ipkdbofstart(struct ipkdb_if *kip) { int unit = kip->unit - 1; @@ -420,16 +407,12 @@ ipkdbofstart(kip) } static void -ipkdbofleave(kip) - struct ipkdb_if *kip; +ipkdbofleave(struct ipkdb_if *kip) { } static int -ipkdbofrcv(kip, buf, poll) - struct ipkdb_if *kip; - u_char *buf; - int poll; +ipkdbofrcv(struct ipkdb_if *kip, u_char *buf, int poll) { int l; @@ -442,18 +425,13 @@ ipkdbofrcv(kip, buf, poll) } static void -ipkdbofsend(kip, buf, l) - struct ipkdb_if *kip; - u_char *buf; - int l; +ipkdbofsend(struct ipkdb_if *kip, u_char *buf, int l) { OF_write(kip->port, buf, l); } static int -ipkdbprobe(match, aux) - struct cfdata *match; - void *aux; +ipkdbprobe(struct cfdata *match, void *aux) { struct ipkdb_if *kip = aux; static char name[256]; diff --git a/sys/dev/ofw/ofrtc.c b/sys/dev/ofw/ofrtc.c index 1efb44eac75..bd03cc827a9 100644 --- a/sys/dev/ofw/ofrtc.c +++ b/sys/dev/ofw/ofrtc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofrtc.c,v 1.8 2001/08/25 19:05:04 matt Exp $ */ +/* $NetBSD: ofrtc.c,v 1.9 2001/08/26 02:49:18 matt Exp $ */ /* * Copyright (C) 1996 Wolfgang Solfrank. @@ -56,10 +56,7 @@ struct cfattach ofrtc_ca = { extern struct cfdriver ofrtc_cd; static int -ofrtc_match(parent, match, aux) - struct device *parent; - struct cfdata *match; - void *aux; +ofrtc_match(struct device *parent, struct cfdata *match, void *aux) { struct ofbus_attach_args *oba = aux; char type[8]; @@ -76,9 +73,7 @@ ofrtc_match(parent, match, aux) } static void -ofrtc_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +ofrtc_attach(struct device *parent, struct device *self, void *aux) { struct ofrtc_softc *of = (void *)self; struct ofbus_attach_args *oba = aux; @@ -97,11 +92,7 @@ ofrtc_attach(parent, self, aux) } int -ofrtc_open(dev, flags, fmt, p) - dev_t dev; - int flags; - int fmt; - struct proc *p; +ofrtc_open(dev_t dev, int flags, int fmt, struct proc *p) { struct ofrtc_softc *of; int unit = minor(dev); @@ -133,27 +124,20 @@ ofrtc_open(dev, flags, fmt, p) } int -ofrtc_close(dev, flags, fmt, p) - dev_t dev; - int flags; - int fmt; - struct proc *p; +ofrtc_close(dev_t dev, int flags, int fmt, struct proc *p) { return 0; } static void -twodigit(bp, i) - char *bp; - int i; +twodigit(char *bp, int i) { *bp++ = i / 10 + '0'; *bp = i % 10 + '0'; } static int -twodigits(bp) - char *bp; +twodigits(char *bp) { int i; @@ -162,10 +146,7 @@ twodigits(bp) } int -ofrtc_read(dev, uio, flag) - dev_t dev; - struct uio *uio; - int flag; +ofrtc_read(dev_t dev, struct uio *uio, int flag) { struct ofrtc_softc *of = ofrtc_cd.cd_devs[minor(dev)]; int date[6]; @@ -197,10 +178,7 @@ ofrtc_read(dev, uio, flag) } int -ofrtc_write(dev, uio, flag) - dev_t dev; - struct uio *uio; - int flag; +ofrtc_write(dev_t dev, struct uio *uio, int flag) { struct ofrtc_softc *of = ofrtc_cd.cd_devs[minor(dev)]; char buf[14]; |
