summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2004-11-29 12:50:06 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2004-11-29 12:50:06 +0000
commitda5bf7b453316aa167786d828c7e6a0bec38c257 (patch)
treee75a9d65cb27e0a3a8c3ae7705fdd01dae5e904f /sys/dev
parent8102e1160dd8fe8ffaa79bede83ad45ec22ddbd8 (diff)
knf/ansi. No binary change.
ok henning@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ofw/ofbus.c25
-rw-r--r--sys/dev/ofw/ofcons.c105
-rw-r--r--sys/dev/ofw/ofdisk.c52
-rw-r--r--sys/dev/ofw/ofnet.c52
-rw-r--r--sys/dev/ofw/ofrtc.c37
5 files changed, 78 insertions, 193 deletions
diff --git a/sys/dev/ofw/ofbus.c b/sys/dev/ofw/ofbus.c
index 033cf010af5..ee44c214853 100644
--- a/sys/dev/ofw/ofbus.c
+++ b/sys/dev/ofw/ofbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofbus.c,v 1.13 2003/10/31 04:08:10 drahn Exp $ */
+/* $OpenBSD: ofbus.c,v 1.14 2004/11/29 12:50:05 jsg Exp $ */
/* $NetBSD: ofbus.c,v 1.3 1996/10/13 01:38:11 christos Exp $ */
/*
@@ -68,9 +68,7 @@ struct cfdriver ofroot_cd = {
};
static int
-ofbprint(aux, name)
- void *aux;
- const char *name;
+ofbprint(void *aux, const char *name)
{
struct ofprobe *ofp = aux;
char child[64];
@@ -95,9 +93,7 @@ ofbprint(aux, name)
}
int
-ofrprobe(parent, cf, aux)
- struct device *parent;
- void *cf, *aux;
+ofrprobe(struct device *parent, void *cf, void *aux)
{
struct confargs *ca = aux;
@@ -107,9 +103,7 @@ ofrprobe(parent, cf, aux)
return 1;
}
void
-ofrattach(parent, dev, aux)
- struct device *parent, *dev;
- void *aux;
+ofrattach(struct device *parent, struct device *dev, void *aux)
{
int child;
char name[64];
@@ -156,9 +150,7 @@ ofrattach(parent, dev, aux)
}
}
int
-ofbprobe(parent, cf, aux)
- struct device *parent;
- void *cf, *aux;
+ofbprobe(struct device *parent, void *cf, void *aux)
{
struct ofprobe *ofp = aux;
@@ -168,9 +160,7 @@ ofbprobe(parent, cf, aux)
}
void
-ofbattach(parent, dev, aux)
- struct device *parent, *dev;
- void *aux;
+ofbattach(struct device *parent, struct device *dev, void *aux)
{
int child;
char name[20];
@@ -222,8 +212,7 @@ ofbattach(parent, dev, aux)
* Name matching routine for OpenFirmware
*/
int
-ofnmmatch(cp1, cp2)
- char *cp1, *cp2;
+ofnmmatch(char *cp1, char *cp2)
{
int i;
diff --git a/sys/dev/ofw/ofcons.c b/sys/dev/ofw/ofcons.c
index 15167ce0324..8a057885547 100644
--- a/sys/dev/ofw/ofcons.c
+++ b/sys/dev/ofw/ofcons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofcons.c,v 1.12 2004/01/03 14:08:53 espie Exp $ */
+/* $OpenBSD: ofcons.c,v 1.13 2004/11/29 12:50:05 jsg Exp $ */
/* $NetBSD: ofcons.c,v 1.3 1996/10/13 01:38:11 christos Exp $ */
/*
@@ -73,9 +73,7 @@ struct cfdriver ofcons_cd = {
static int ofcprobe(void);
static int
-ofcmatch(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ofcmatch(struct device *parent, void *match, void *aux)
{
struct ofprobe *ofp = aux;
@@ -90,9 +88,7 @@ static int ofcparam(struct tty *, struct termios *);
static void ofcpoll(void *);
static void
-ofcattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ofcattach(struct device *parent, struct device *self, void *aux)
{
struct ofc_softc *sc = (void *)self;
@@ -103,28 +99,25 @@ ofcattach(parent, self, aux)
void ofcstart(struct tty *);
int ofcparam(struct tty *, struct termios *);
void ofcpoll(void *);
-int ofcopen(dev_t dev, int flag, int mode, struct proc *p);
-int ofcclose(dev_t dev, int flag, int mode, struct proc *p);
-int ofcread(dev_t dev, struct uio *uio, int flag);
-int ofcwrite(dev_t dev, struct uio *uio, int flag);
-int ofcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p);
-struct tty * ofctty(dev_t dev);
-void ofcstop(struct tty *tp, int flag);
-void ofcstart(struct tty *tp);
-int ofcparam(struct tty *tp, struct termios *t);
-void ofcpoll(void *aux);
-void ofccnprobe(struct consdev *cd);
-void ofccninit(struct consdev *cd);
-int ofccngetc(dev_t dev);
-void ofccnputc(dev_t dev, int c);
-void ofccnpollc(dev_t dev, int on);
-void ofprintf(char *fmt, ...);
+int ofcopen(dev_t, int, int, struct proc *);
+int ofcclose(dev_t, int, int, struct proc *);
+int ofcread(dev_t, struct uio *, int);
+int ofcwrite(dev_t, struct uio *, int);
+int ofcioctl(dev_t, u_long, caddr_t, int, struct proc *);
+struct tty * ofctty(dev_t);
+void ofcstop(struct tty *, int);
+void ofcstart(struct tty *);
+int ofcparam(struct tty *, struct termios *);
+void ofcpoll(void *);
+void ofccnprobe(struct consdev *);
+void ofccninit(struct consdev *);
+int ofccngetc(dev_t);
+void ofccnputc(dev_t, int);
+void ofccnpollc(dev_t, int);
+void ofprintf(char *, ...);
int
-ofcopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+ofcopen(dev_t dev, int flag, int mode, struct proc *p)
{
struct ofc_softc *sc;
int unit = minor(dev);
@@ -163,10 +156,7 @@ ofcopen(dev, flag, mode, p)
}
int
-ofcclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+ofcclose(dev_t dev, int flag, int mode, struct proc *p)
{
struct ofc_softc *sc = ofcons_cd.cd_devs[minor(dev)];
struct tty *tp = sc->of_tty;
@@ -179,10 +169,7 @@ ofcclose(dev, flag, mode, p)
}
int
-ofcread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+ofcread(dev_t dev, struct uio *uio, int flag)
{
struct ofc_softc *sc = ofcons_cd.cd_devs[minor(dev)];
struct tty *tp = sc->of_tty;
@@ -191,10 +178,7 @@ ofcread(dev, uio, flag)
}
int
-ofcwrite(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+ofcwrite(dev_t dev, struct uio *uio, int flag)
{
struct ofc_softc *sc = ofcons_cd.cd_devs[minor(dev)];
struct tty *tp = sc->of_tty;
@@ -203,12 +187,7 @@ ofcwrite(dev, uio, flag)
}
int
-ofcioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+ofcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
struct ofc_softc *sc = ofcons_cd.cd_devs[minor(dev)];
struct tty *tp = sc->of_tty;
@@ -222,8 +201,7 @@ ofcioctl(dev, cmd, data, flag, p)
}
struct tty *
-ofctty(dev)
- dev_t dev;
+ofctty(dev_t dev)
{
struct ofc_softc *sc = ofcons_cd.cd_devs[minor(dev)];
@@ -231,15 +209,12 @@ ofctty(dev)
}
void
-ofcstop(tp, flag)
- struct tty *tp;
- int flag;
+ofcstop(struct tty *tp, int flag)
{
}
void
-ofcstart(tp)
- struct tty *tp;
+ofcstart(struct tty *tp)
{
struct clist *cl;
int s, len;
@@ -272,9 +247,7 @@ ofcstart(tp)
}
int
-ofcparam(tp, t)
- struct tty *tp;
- struct termios *t;
+ofcparam(struct tty *tp, struct termios *t)
{
tp->t_ispeed = t->c_ispeed;
tp->t_ospeed = t->c_ospeed;
@@ -283,8 +256,7 @@ ofcparam(tp, t)
}
void
-ofcpoll(aux)
- void *aux;
+ofcpoll(void *aux)
{
struct ofc_softc *sc = aux;
struct tty *tp = sc->of_tty;
@@ -298,7 +270,7 @@ ofcpoll(aux)
}
static int
-ofcprobe()
+ofcprobe(void)
{
int chosen;
@@ -313,8 +285,7 @@ ofcprobe()
}
void
-ofccnprobe(cd)
- struct consdev *cd;
+ofccnprobe(struct consdev *cd)
{
int maj;
@@ -329,14 +300,12 @@ ofccnprobe(cd)
}
void
-ofccninit(cd)
- struct consdev *cd;
+ofccninit(struct consdev *cd)
{
}
int
-ofccngetc(dev)
- dev_t dev;
+ofccngetc(dev_t dev)
{
unsigned char ch;
int l;
@@ -348,9 +317,7 @@ ofccngetc(dev)
}
void
-ofccnputc(dev, c)
- dev_t dev;
- int c;
+ofccnputc(dev_t dev, int c)
{
char ch = c;
@@ -364,9 +331,7 @@ ofccnputc(dev, c)
}
void
-ofccnpollc(dev, on)
- dev_t dev;
- int on;
+ofccnpollc(dev_t dev, int on)
{
struct ofc_softc *sc = ofcons_cd.cd_devs[minor(dev)];
diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c
index 7eb875e3ddc..e63668ae142 100644
--- a/sys/dev/ofw/ofdisk.c
+++ b/sys/dev/ofw/ofdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofdisk.c,v 1.8 2004/02/15 02:45:47 tedu Exp $ */
+/* $OpenBSD: ofdisk.c,v 1.9 2004/11/29 12:50:05 jsg Exp $ */
/* $NetBSD: ofdisk.c,v 1.3 1996/10/13 01:38:13 christos Exp $ */
/*
@@ -70,9 +70,7 @@ void ofdstrategy(struct buf *);
struct dkdriver ofdkdriver = { ofdstrategy };
static int
-ofdprobe(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ofdprobe(struct device *parent, void *match, void *aux)
{
struct ofprobe *ofp = aux;
char type[8];
@@ -87,9 +85,7 @@ ofdprobe(parent, match, aux)
}
static void
-ofdattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ofdattach(struct device *parent, struct device *self, void *aux)
{
struct ofd_softc *of = (void *)self;
struct ofprobe *ofp = aux;
@@ -107,11 +103,7 @@ ofdattach(parent, self, aux)
}
int
-ofdopen(dev, flags, fmt, p)
- dev_t dev;
- int flags;
- int fmt;
- struct proc *p;
+ofdopen(dev_t dev, int flags, int fmt, struct proc *p)
{
int unit = DISKUNIT(dev);
struct ofd_softc *of;
@@ -194,11 +186,7 @@ ofdopen(dev, flags, fmt, p)
}
int
-ofdclose(dev, flags, fmt, p)
- dev_t dev;
- int flags;
- int fmt;
- struct proc *p;
+ofdclose(dev_t dev, int flags, int fmt, struct proc *p)
{
struct ofd_softc *of = ofdisk_cd.cd_devs[DISKUNIT(dev)];
@@ -227,8 +215,7 @@ ofdclose(dev, flags, fmt, p)
}
void
-ofdstrategy(bp)
- struct buf *bp;
+ofdstrategy(struct buf *bp)
{
struct ofd_softc *of = ofdisk_cd.cd_devs[DISKUNIT(bp->b_dev)];
struct partition *p;
@@ -280,8 +267,7 @@ done:
}
static void
-ofminphys(bp)
- struct buf *bp;
+ofminphys(struct buf *bp)
{
struct ofd_softc *of = ofdisk_cd.cd_devs[DISKUNIT(bp->b_dev)];
@@ -290,28 +276,19 @@ ofminphys(bp)
}
int
-ofdread(dev, uio)
- dev_t dev;
- struct uio *uio;
+ofdread(dev_t dev, struct uio *uio)
{
return physio(ofdstrategy, NULL, dev, B_READ, ofminphys, uio);
}
int
-ofdwrite(dev, uio)
- dev_t dev;
- struct uio *uio;
+ofdwrite(dev_t dev, struct uio *uio)
{
return physio(ofdstrategy, NULL, dev, B_WRITE, ofminphys, uio);
}
int
-ofdioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+ofdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
struct ofd_softc *of = ofdisk_cd.cd_devs[DISKUNIT(dev)];
int error;
@@ -349,18 +326,13 @@ ofdioctl(dev, cmd, data, flag, p)
}
int
-ofddump(dev, blkno, va, size)
- dev_t dev;
- daddr_t blkno;
- caddr_t va;
- size_t size;
+ofddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size)
{
return EINVAL;
}
int
-ofdsize(dev)
- dev_t dev;
+ofdsize(dev_t dev)
{
struct ofd_softc *of;
int part;
diff --git a/sys/dev/ofw/ofnet.c b/sys/dev/ofw/ofnet.c
index 1740ff276ad..b85322888fc 100644
--- a/sys/dev/ofw/ofnet.c
+++ b/sys/dev/ofw/ofnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofnet.c,v 1.8 2002/03/14 01:26:58 millert Exp $ */
+/* $OpenBSD: ofnet.c,v 1.9 2004/11/29 12:50:05 jsg Exp $ */
/* $NetBSD: ofnet.c,v 1.4 1996/10/16 19:33:21 ws Exp $ */
/*
@@ -94,9 +94,7 @@ static int ofnioctl(struct ifnet *, u_long, caddr_t);
static void ofnwatchdog(struct ifnet *);
static int
-ofnprobe(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ofnprobe(struct device *parent, void *match, void *aux)
{
struct ofprobe *ofp = aux;
char type[32];
@@ -117,9 +115,7 @@ ofnprobe(parent, match, aux)
}
static void
-ofnattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ofnattach(struct device *parent, struct device *self, void *aux)
{
struct ofn_softc *of = (void *)self;
struct ifnet *ifp = &of->sc_arpcom.ac_if;
@@ -173,8 +169,7 @@ printf("\nethernet dev: path %s\n", path);
}
static void
-ofnread(of)
- struct ofn_softc *of;
+ofnread(struct ofn_softc *of)
{
struct ifnet *ifp = &of->sc_arpcom.ac_if;
struct mbuf *m, **mp, *head;
@@ -246,16 +241,14 @@ ofnread(of)
}
static void
-ofntimer(of)
- struct ofn_softc *of;
+ofntimer(struct ofn_softc *of)
{
ofnread(of);
timeout_add(&of->sc_tmo, 1);
}
static void
-ofninit(of)
- struct ofn_softc *of;
+ofninit(struct ofn_softc *of)
{
struct ifnet *ifp = &of->sc_arpcom.ac_if;
@@ -270,16 +263,14 @@ ofninit(of)
}
static void
-ofnstop(of)
- struct ofn_softc *of;
+ofnstop(struct ofn_softc *of)
{
timeout_del(&of->sc_tmo);
of->sc_arpcom.ac_if.if_flags &= ~IFF_RUNNING;
}
static void
-ofnstart(ifp)
- struct ifnet *ifp;
+ofnstart(struct ifnet *ifp)
{
struct ofn_softc *of = ifp->if_softc;
struct mbuf *m, *m0;
@@ -328,10 +319,7 @@ ofnstart(ifp)
}
static int
-ofnioctl(ifp, cmd, data)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
+ofnioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct ofn_softc *of = ifp->if_softc;
struct ifaddr *ifa = (struct ifaddr *)data;
@@ -374,8 +362,7 @@ ofnioctl(ifp, cmd, data)
}
static void
-ofnwatchdog(ifp)
- struct ifnet *ifp;
+ofnwatchdog(struct ifnet *ifp)
{
struct ofn_softc *of = ifp->if_softc;
@@ -388,8 +375,7 @@ ofnwatchdog(ifp)
#if NIPKDB_OFN > 0
/* has not been updated to use dmabuf */
static void
-ipkdbofstart(kip)
- struct ipkdb_if *kip;
+ipkdbofstart(struct ipkdb_if *kip)
{
int unit = kip->unit - 1;
@@ -398,16 +384,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;
@@ -420,17 +402,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)
- void *match, *aux;
+ipkdbprobe(void *match, void *aux)
{
struct cfdata *cf = match;
struct ipkdb_if *kip = aux;
diff --git a/sys/dev/ofw/ofrtc.c b/sys/dev/ofw/ofrtc.c
index fda118db760..38213af8c2a 100644
--- a/sys/dev/ofw/ofrtc.c
+++ b/sys/dev/ofw/ofrtc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofrtc.c,v 1.5 2002/03/14 01:26:58 millert Exp $ */
+/* $OpenBSD: ofrtc.c,v 1.6 2004/11/29 12:50:05 jsg Exp $ */
/* $NetBSD: ofrtc.c,v 1.3 1996/10/13 01:38:14 christos Exp $ */
/*
@@ -55,9 +55,7 @@ struct cfdriver ofrtc_cd = {
};
static int
-ofrtcprobe(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+ofrtcprobe(struct device *parent, void *match, void *aux)
{
struct ofprobe *ofp = aux;
char type[8];
@@ -78,9 +76,7 @@ typedef int (clock_read_t)(int *sec, int *min, int *hour, int *day,
extern clock_read_t *clock_read;
static void
-ofrtcattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ofrtcattach(struct device *parent, struct device *self, void *aux)
{
struct ofrtc_softc *of = (void *)self;
struct ofprobe *ofp = aux;
@@ -99,10 +95,7 @@ ofrtcattach(parent, self, aux)
}
int
-ofrtcopen(dev, flags, fmt)
- dev_t dev;
- int flags;
- int fmt;
+ofrtcopen(dev_t dev, int flags, int fmt)
{
struct ofrtc_softc *of;
int unit = minor(dev);
@@ -134,26 +127,20 @@ ofrtcopen(dev, flags, fmt)
}
int
-ofrtcclose(dev, flags, fmt)
- dev_t dev;
- int flags;
- int fmt;
+ofrtcclose(dev_t dev, int flags, int fmt)
{
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 +149,7 @@ twodigits(bp)
}
int
-ofrtcread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+ofrtcread(dev_t dev, struct uio *uio, int flag)
{
struct ofrtc_softc *of = ofrtc_cd.cd_devs[minor(dev)];
int date[6];
@@ -197,10 +181,7 @@ ofrtcread(dev, uio, flag)
}
int
-ofrtcwrite(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+ofrtcwrite(dev_t dev, struct uio *uio, int flag)
{
struct ofrtc_softc *of = ofrtc_cd.cd_devs[minor(dev)];
char buf[14];