summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-12-27 11:06:39 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-12-27 11:06:39 +0000
commitad0e8e0eb7e48992d4ba394c7dcf65a4569a8a46 (patch)
tree5e1ec76527699f234bf31ffc0946d873e24830a4 /sys
parentd3d33287e66e771e3282805ef05d554ed587e685 (diff)
Move away from K&R style function definitions. clang is rather picky about
them especially if char and short arguments are used. OK otto@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/dev/ce4231.c86
-rw-r--r--sys/arch/sparc64/dev/comkbd_ebus.c41
-rw-r--r--sys/arch/sparc64/dev/fd.c143
-rw-r--r--sys/arch/sparc64/dev/vgafb.c42
-rw-r--r--sys/arch/sparc64/dev/z8530kbd.c71
-rw-r--r--sys/arch/sparc64/dev/zs.c96
6 files changed, 127 insertions, 352 deletions
diff --git a/sys/arch/sparc64/dev/ce4231.c b/sys/arch/sparc64/dev/ce4231.c
index 3655f9a3a5d..39cab2766e2 100644
--- a/sys/arch/sparc64/dev/ce4231.c
+++ b/sys/arch/sparc64/dev/ce4231.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ce4231.c,v 1.35 2016/09/19 06:46:43 ratchov Exp $ */
+/* $OpenBSD: ce4231.c,v 1.36 2018/12/27 11:06:38 claudio Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -184,9 +184,7 @@ struct cfdriver audioce_cd = {
};
int
-ce4231_match(parent, vcf, aux)
- struct device *parent;
- void *vcf, *aux;
+ce4231_match(struct device *parent, void *vcf, void *aux)
{
struct ebus_attach_args *ea = aux;
@@ -197,9 +195,7 @@ ce4231_match(parent, vcf, aux)
}
void
-ce4231_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+ce4231_attach(struct device *parent, struct device *self, void *aux)
{
struct ebus_attach_args *ea = aux;
struct ce4231_softc *sc = (struct ce4231_softc *)self;
@@ -313,9 +309,7 @@ ce4231_attach(parent, self, aux)
* Write to one of the indexed registers of cs4231.
*/
void
-ce4231_write(sc, r, v)
- struct ce4231_softc *sc;
- u_int8_t r, v;
+ce4231_write(struct ce4231_softc *sc, u_int8_t r, u_int8_t v)
{
CS_WRITE(sc, AD1848_IADDR, r);
CS_WRITE(sc, AD1848_IDATA, v);
@@ -325,19 +319,14 @@ ce4231_write(sc, r, v)
* Read from one of the indexed registers of cs4231.
*/
u_int8_t
-ce4231_read(sc, r)
- struct ce4231_softc *sc;
- u_int8_t r;
+ce4231_read(struct ce4231_softc *sc, u_int8_t r)
{
CS_WRITE(sc, AD1848_IADDR, r);
return (CS_READ(sc, AD1848_IDATA));
}
int
-ce4231_set_speed(sc, argp)
- struct ce4231_softc *sc;
- u_long *argp;
-
+ce4231_set_speed(struct ce4231_softc *sc, u_long *argp)
{
/*
* The available speeds are in the following table. Keep the speeds in
@@ -405,9 +394,7 @@ ce4231_set_speed(sc, argp)
* Audio interface functions
*/
int
-ce4231_open(addr, flags)
- void *addr;
- int flags;
+ce4231_open(void *addr, int flags)
{
struct ce4231_softc *sc = addr;
int tries;
@@ -443,8 +430,7 @@ ce4231_open(addr, flags)
}
void
-ce4231_close(addr)
- void *addr;
+ce4231_close(void *addr)
{
struct ce4231_softc *sc = addr;
@@ -456,10 +442,8 @@ ce4231_close(addr)
}
int
-ce4231_set_params(addr, setmode, usemode, p, r)
- void *addr;
- int setmode, usemode;
- struct audio_params *p, *r;
+ce4231_set_params(void *addr, int setmode, int usemode, struct audio_params *p,
+ struct audio_params *r)
{
struct ce4231_softc *sc = (struct ce4231_softc *)addr;
int err, bits, enc = p->encoding;
@@ -510,16 +494,13 @@ ce4231_set_params(addr, setmode, usemode, p, r)
}
int
-ce4231_round_blocksize(addr, blk)
- void *addr;
- int blk;
+ce4231_round_blocksize(void *addr, int blk)
{
return ((blk + 3) & (-4));
}
int
-ce4231_commit_settings(addr)
- void *addr;
+ce4231_commit_settings(void *addr)
{
struct ce4231_softc *sc = (struct ce4231_softc *)addr;
int tries;
@@ -588,8 +569,7 @@ ce4231_commit_settings(addr)
}
int
-ce4231_halt_output(addr)
- void *addr;
+ce4231_halt_output(void *addr)
{
struct ce4231_softc *sc = (struct ce4231_softc *)addr;
@@ -601,8 +581,7 @@ ce4231_halt_output(addr)
}
int
-ce4231_halt_input(addr)
- void *addr;
+ce4231_halt_input(void *addr)
{
struct ce4231_softc *sc = (struct ce4231_softc *)addr;
@@ -1080,8 +1059,7 @@ onoff:
}
int
-ce4231_get_props(addr)
- void *addr;
+ce4231_get_props(void *addr)
{
return (AUDIO_PROP_FULLDUPLEX);
}
@@ -1102,8 +1080,7 @@ ce4231_get_props(addr)
*/
int
-ce4231_pintr(v)
- void *v;
+ce4231_pintr(void *v)
{
struct ce4231_softc *sc = (struct ce4231_softc *)v;
u_int32_t csr;
@@ -1155,8 +1132,7 @@ ce4231_pintr(v)
}
int
-ce4231_cintr(v)
- void *v;
+ce4231_cintr(void *v)
{
struct ce4231_softc *sc = (struct ce4231_softc *)v;
u_int32_t csr;
@@ -1208,12 +1184,7 @@ ce4231_cintr(v)
}
void *
-ce4231_alloc(addr, direction, size, pool, flags)
- void *addr;
- int direction;
- size_t size;
- int pool;
- int flags;
+ce4231_alloc(void *addr, int direction, size_t size, int pool, int flags)
{
struct ce4231_softc *sc = (struct ce4231_softc *)addr;
bus_dma_tag_t dmat = sc->sc_dmatag;
@@ -1258,10 +1229,7 @@ fail:
}
void
-ce4231_free(addr, ptr, pool)
- void *addr;
- void *ptr;
- int pool;
+ce4231_free(void *addr, void *ptr, int pool)
{
struct ce4231_softc *sc = addr;
bus_dma_tag_t dmat = sc->sc_dmatag;
@@ -1282,12 +1250,8 @@ ce4231_free(addr, ptr, pool)
}
int
-ce4231_trigger_output(addr, start, end, blksize, intr, arg, param)
- void *addr, *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+ce4231_trigger_output(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct ce4231_softc *sc = addr;
struct cs_dma *p;
@@ -1348,12 +1312,8 @@ ce4231_trigger_output(addr, start, end, blksize, intr, arg, param)
}
int
-ce4231_trigger_input(addr, start, end, blksize, intr, arg, param)
- void *addr, *start, *end;
- int blksize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+ce4231_trigger_input(void *addr, void *start, void *end, int blksize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct ce4231_softc *sc = addr;
struct cs_dma *p;
diff --git a/sys/arch/sparc64/dev/comkbd_ebus.c b/sys/arch/sparc64/dev/comkbd_ebus.c
index a06815a66ba..aacc1cee517 100644
--- a/sys/arch/sparc64/dev/comkbd_ebus.c
+++ b/sys/arch/sparc64/dev/comkbd_ebus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: comkbd_ebus.c,v 1.22 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: comkbd_ebus.c,v 1.23 2018/12/27 11:06:38 claudio Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -123,8 +123,7 @@ struct wskbd_consops comkbd_consops = {
};
int
-comkbd_iskbd(node)
- int node;
+comkbd_iskbd(int node)
{
if (OF_getproplen(node, "keyboard") == 0)
return (10);
@@ -132,10 +131,7 @@ comkbd_iskbd(node)
}
int
-comkbd_match(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+comkbd_match(struct device *parent, void *match, void *aux)
{
struct ebus_attach_args *ea = aux;
int i;
@@ -159,9 +155,7 @@ comkbd_match(parent, match, aux)
}
void
-comkbd_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+comkbd_attach(struct device *parent, struct device *self, void *aux)
{
struct comkbd_softc *sc = (void *)self;
struct sunkbd_softc *ss = (void *)sc;
@@ -258,17 +252,12 @@ comkbd_attach(parent, self, aux)
}
void
-comkbd_cnpollc(vsc, on)
- void *vsc;
- int on;
+comkbd_cnpollc(void *vsc, int on)
{
}
void
-comkbd_cngetc(v, type, data)
- void *v;
- u_int *type;
- int *data;
+comkbd_cngetc(void *v, u_int *type, int *data)
{
struct comkbd_softc *sc = v;
int s;
@@ -287,9 +276,7 @@ comkbd_cngetc(v, type, data)
}
void
-comkbd_putc(sc, c)
- struct comkbd_softc *sc;
- u_int8_t c;
+comkbd_putc(struct comkbd_softc *sc, u_int8_t c)
{
int s, timo;
@@ -315,10 +302,7 @@ comkbd_putc(sc, c)
}
int
-comkbd_enqueue(v, buf, buflen)
- void *v;
- u_int8_t *buf;
- u_int buflen;
+comkbd_enqueue(void *v, u_int8_t *buf, u_int buflen)
{
struct comkbd_softc *sc = v;
int s;
@@ -348,8 +332,7 @@ comkbd_enqueue(v, buf, buflen)
}
void
-comkbd_soft(vsc)
- void *vsc;
+comkbd_soft(void *vsc)
{
struct comkbd_softc *sc = vsc;
struct sunkbd_softc *ss = (void *)sc;
@@ -386,8 +369,7 @@ comkbd_soft(vsc)
}
int
-comkbd_intr(vsc)
- void *vsc;
+comkbd_intr(void *vsc)
{
struct comkbd_softc *sc = vsc;
u_int8_t iir, lsr, data;
@@ -436,8 +418,7 @@ comkbd_intr(vsc)
}
int
-comkbd_init(sc)
- struct comkbd_softc *sc;
+comkbd_init(struct comkbd_softc *sc)
{
struct sunkbd_softc *ss = (void *)sc;
u_int8_t stat, c;
diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c
index 3fb2bce141c..8d548062f83 100644
--- a/sys/arch/sparc64/dev/fd.c
+++ b/sys/arch/sparc64/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.49 2017/12/30 23:08:29 guenther Exp $ */
+/* $OpenBSD: fd.c,v 1.50 2018/12/27 11:06:38 claudio Exp $ */
/* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */
/*-
@@ -313,9 +313,7 @@ void fd_do_eject(struct fd_softc *);
static int fdconf(struct fdc_softc *);
int
-fdcmatch_sbus(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+fdcmatch_sbus(struct device *parent, void *match, void *aux)
{
struct sbus_attach_args *sa = aux;
@@ -323,9 +321,7 @@ fdcmatch_sbus(parent, match, aux)
}
void
-fdcattach_sbus(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+fdcattach_sbus(struct device *parent, struct device *self, void *aux)
{
struct fdc_softc *fdc = (void *)self;
struct sbus_attach_args *sa = aux;
@@ -362,9 +358,7 @@ fdcattach_sbus(parent, self, aux)
}
int
-fdcmatch_ebus(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+fdcmatch_ebus(struct device *parent, void *match, void *aux)
{
struct ebus_attach_args *ea = aux;
@@ -372,9 +366,7 @@ fdcmatch_ebus(parent, match, aux)
}
void
-fdcattach_ebus(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+fdcattach_ebus(struct device *parent, struct device *self, void *aux)
{
struct fdc_softc *fdc = (void *)self;
struct ebus_attach_args *ea = aux;
@@ -440,9 +432,7 @@ struct fdc_attach_args {
* avoid printing `fdN not configured' messages.
*/
int
-fdprint(aux, fdc)
- void *aux;
- const char *fdc;
+fdprint(void *aux, const char *fdc)
{
register struct fdc_attach_args *fa = aux;
@@ -456,8 +446,7 @@ fdprint(aux, fdc)
* Return 0 on success.
*/
static int
-fdconf(fdc)
- struct fdc_softc *fdc;
+fdconf(struct fdc_softc *fdc)
{
int vroom;
@@ -502,9 +491,7 @@ fdconf(fdc)
}
int
-fdcattach(fdc, pri)
- struct fdc_softc *fdc;
- int pri;
+fdcattach(struct fdc_softc *fdc, int pri)
{
struct fdc_attach_args fa;
int drive_attached;
@@ -564,10 +551,7 @@ fdcattach(fdc, pri)
}
int
-fdmatch(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+fdmatch(struct device *parent, void *match, void *aux)
{
struct fdc_softc *fdc = (void *)parent;
bus_space_tag_t t = fdc->sc_bustag;
@@ -633,9 +617,7 @@ fdmatch(parent, match, aux)
* Controller is working, and drive responded. Attach it.
*/
void
-fdattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+fdattach(struct device *parent, struct device *self, void *aux)
{
struct fdc_softc *fdc = (void *)parent;
struct fd_softc *fd = (void *)self;
@@ -689,9 +671,7 @@ fdactivate(struct device *self, int act)
}
__inline struct fd_type *
-fd_dev_to_type(fd, dev)
- struct fd_softc *fd;
- dev_t dev;
+fd_dev_to_type(struct fd_softc *fd, dev_t dev)
{
int type = FDTYPE(dev);
@@ -701,8 +681,7 @@ fd_dev_to_type(fd, dev)
}
void
-fdstrategy(bp)
- register struct buf *bp; /* IO operation to perform */
+fdstrategy(struct buf *bp)
{
struct fd_softc *fd;
int unit = FDUNIT(bp->b_dev);
@@ -780,8 +759,7 @@ done:
}
void
-fdstart(fd)
- struct fd_softc *fd;
+fdstart(struct fd_softc *fd)
{
struct fdc_softc *fdc = (void *)fd->sc_dv.dv_parent;
int active = !TAILQ_EMPTY(&fdc->sc_drives);
@@ -796,9 +774,7 @@ fdstart(fd)
}
void
-fdfinish(fd, bp)
- struct fd_softc *fd;
- struct buf *bp;
+fdfinish(struct fd_softc *fd, struct buf *bp)
{
struct fdc_softc *fdc = (void *)fd->sc_dv.dv_parent;
@@ -825,8 +801,7 @@ fdfinish(fd, bp)
}
void
-fdc_reset(fdc)
- struct fdc_softc *fdc;
+fdc_reset(struct fdc_softc *fdc)
{
bus_space_tag_t t = fdc->sc_bustag;
bus_space_handle_t h = fdc->sc_handle;
@@ -846,8 +821,7 @@ fdc_reset(fdc)
}
void
-fd_set_motor(fdc)
- struct fdc_softc *fdc;
+fd_set_motor(struct fdc_softc *fdc)
{
struct fd_softc *fd;
u_char status;
@@ -865,8 +839,7 @@ fd_set_motor(fdc)
}
void
-fd_motor_off(arg)
- void *arg;
+fd_motor_off(void *arg)
{
struct fd_softc *fd = arg;
int s;
@@ -878,8 +851,7 @@ fd_motor_off(arg)
}
void
-fd_motor_on(arg)
- void *arg;
+fd_motor_on(void *arg)
{
struct fd_softc *fd = arg;
struct fdc_softc *fdc = (void *)fd->sc_dv.dv_parent;
@@ -898,8 +870,7 @@ fd_motor_on(arg)
* The return value is also stored in `sc_nstat'.
*/
int
-fdcresult(fdc)
- struct fdc_softc *fdc;
+fdcresult(struct fdc_softc *fdc)
{
bus_space_tag_t t = fdc->sc_bustag;
bus_space_handle_t h = fdc->sc_handle;
@@ -930,9 +901,7 @@ fdcresult(fdc)
* Returns 0 on success; -1 on failure (i.e. timeout)
*/
int
-fdc_wrfifo(fdc, x)
- struct fdc_softc *fdc;
- u_int8_t x;
+fdc_wrfifo(struct fdc_softc *fdc, u_int8_t x)
{
bus_space_tag_t t = fdc->sc_bustag;
bus_space_handle_t h = fdc->sc_handle;
@@ -951,8 +920,7 @@ fdc_wrfifo(fdc, x)
}
int
-fdc_diskchange(fdc)
- struct fdc_softc *fdc;
+fdc_diskchange(struct fdc_softc *fdc)
{
bus_space_tag_t t = fdc->sc_bustag;
bus_space_handle_t h = fdc->sc_handle;
@@ -962,10 +930,7 @@ fdc_diskchange(fdc)
}
int
-fdopen(dev, flags, fmt, p)
- dev_t dev;
- int flags, fmt;
- struct proc *p;
+fdopen(dev_t dev, int flags, int fmt, struct proc *p)
{
int unit, pmask;
struct fd_softc *fd;
@@ -1013,10 +978,7 @@ fdopen(dev, flags, fmt, p)
}
int
-fdclose(dev, flags, fmt, p)
- dev_t dev;
- int flags, fmt;
- struct proc *p;
+fdclose(dev_t dev, int flags, int fmt, struct proc *p)
{
struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(dev)];
int pmask = (1 << DISKPART(dev));
@@ -1040,28 +1002,21 @@ fdclose(dev, flags, fmt, p)
}
int
-fdread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+fdread(dev_t dev, struct uio *uio, int flag)
{
return (physio(fdstrategy, dev, B_READ, minphys, uio));
}
int
-fdwrite(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+fdwrite(dev_t dev, struct uio *uio, int flag)
{
return (physio(fdstrategy, dev, B_WRITE, minphys, uio));
}
void
-fdcstart(fdc)
- struct fdc_softc *fdc;
+fdcstart(struct fdc_softc *fdc)
{
#ifdef DIAGNOSTIC
@@ -1076,9 +1031,7 @@ fdcstart(fdc)
}
void
-fdcstatus(fdc, s)
- struct fdc_softc *fdc;
- char *s;
+fdcstatus(struct fdc_softc *fdc, char *s)
{
struct fd_softc *fd = TAILQ_FIRST(&fdc->sc_drives);
int n;
@@ -1122,8 +1075,7 @@ fdcstatus(fdc, s)
}
void
-fdctimeout(arg)
- void *arg;
+fdctimeout(void *arg)
{
struct fdc_softc *fdc = arg;
struct fd_softc *fd;
@@ -1150,8 +1102,7 @@ out:
}
void
-fdcpseudointr(arg)
- void *arg;
+fdcpseudointr(void *arg)
{
struct fdc_softc *fdc = arg;
int s;
@@ -1170,8 +1121,7 @@ fdcpseudointr(arg)
* that the other devices that share this interrupt can do better..
*/
int
-fdchwintr(arg)
- void *arg;
+fdchwintr(void *arg)
{
struct fdc_softc *fdc = arg;
bus_space_tag_t t = fdc->sc_bustag;
@@ -1249,8 +1199,7 @@ fdchwintr(arg)
}
void
-fdcswintr(arg)
- void *arg;
+fdcswintr(void *arg)
{
struct fdc_softc *fdc = arg;
int s;
@@ -1275,8 +1224,7 @@ fdcswintr(arg)
}
int
-fdcstate(fdc)
- struct fdc_softc *fdc;
+fdcstate(struct fdc_softc *fdc)
{
#define st0 fdc->sc_status[0]
#define st1 fdc->sc_status[1]
@@ -1729,8 +1677,7 @@ xxx:
}
void
-fdcretry(fdc)
- struct fdc_softc *fdc;
+fdcretry(struct fdc_softc *fdc)
{
struct fd_softc *fd;
struct buf *bp;
@@ -1802,8 +1749,7 @@ fdcretry(fdc)
}
daddr_t
-fdsize(dev)
- dev_t dev;
+fdsize(dev_t dev)
{
/* Swapping to floppies would not make sense. */
@@ -1811,11 +1757,7 @@ fdsize(dev)
}
int
-fddump(dev, blkno, va, size)
- dev_t dev;
- daddr_t blkno;
- caddr_t va;
- size_t size;
+fddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size)
{
/* Not implemented. */
@@ -1823,12 +1765,7 @@ fddump(dev, blkno, va, size)
}
int
-fdioctl(dev, cmd, addr, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t addr;
- int flag;
- struct proc *p;
+fdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
{
struct fd_softc *fd;
struct fdc_softc *fdc;
@@ -1951,10 +1888,7 @@ fdioctl(dev, cmd, addr, flag, p)
}
int
-fdformat(dev, finfo, p)
- dev_t dev;
- struct fd_formb *finfo;
- struct proc *p;
+fdformat(dev_t dev, struct fd_formb *finfo, struct proc *p)
{
int rv = 0;
struct fd_softc *fd = fd_cd.cd_devs[FDUNIT(dev)];
@@ -2045,8 +1979,7 @@ fdgetdisklabel(dev_t dev, struct fd_softc *fd, struct disklabel *lp,
}
void
-fd_do_eject(fd)
- struct fd_softc *fd;
+fd_do_eject(struct fd_softc *fd)
{
struct fdc_softc *fdc = (void *)fd->sc_dv.dv_parent;
bus_space_tag_t t = fdc->sc_bustag;
diff --git a/sys/arch/sparc64/dev/vgafb.c b/sys/arch/sparc64/dev/vgafb.c
index e24ea84cb3a..eba8ced5d43 100644
--- a/sys/arch/sparc64/dev/vgafb.c
+++ b/sys/arch/sparc64/dev/vgafb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vgafb.c,v 1.65 2017/08/07 22:19:10 kettenis Exp $ */
+/* $OpenBSD: vgafb.c,v 1.66 2018/12/27 11:06:38 claudio Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -104,9 +104,7 @@ extern int allowaperture;
#endif
int
-vgafbmatch(parent, vcf, aux)
- struct device *parent;
- void *vcf, *aux;
+vgafbmatch(struct device *parent, void *vcf, void *aux)
{
struct pci_attach_args *pa = aux;
int node;
@@ -141,9 +139,7 @@ vgafbmatch(parent, vcf, aux)
}
void
-vgafbattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+vgafbattach(struct device *parent, struct device *self, void *aux)
{
struct vgafb_softc *sc = (struct vgafb_softc *)self;
struct pci_attach_args *pa = aux;
@@ -193,12 +189,7 @@ vgafbattach(parent, self, aux)
}
int
-vgafb_ioctl(v, cmd, data, flags, p)
- void *v;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+vgafb_ioctl(void *v, u_long cmd, caddr_t data, int flags, struct proc *p)
{
struct vgafb_softc *sc = v;
struct wsdisplay_fbinfo *wdf;
@@ -266,9 +257,7 @@ vgafb_ioctl(v, cmd, data, flags, p)
}
int
-vgafb_getcmap(sc, cm)
- struct vgafb_softc *sc;
- struct wsdisplay_cmap *cm;
+vgafb_getcmap(struct vgafb_softc *sc, struct wsdisplay_cmap *cm)
{
u_int index = cm->index;
u_int count = cm->count;
@@ -290,9 +279,7 @@ vgafb_getcmap(sc, cm)
}
int
-vgafb_putcmap(sc, cm)
- struct vgafb_softc *sc;
- struct wsdisplay_cmap *cm;
+vgafb_putcmap(struct vgafb_softc *sc, struct wsdisplay_cmap *cm)
{
u_int index = cm->index;
u_int count = cm->count;
@@ -323,10 +310,7 @@ vgafb_putcmap(sc, cm)
}
void
-vgafb_setcolor(v, index, r, g, b)
- void *v;
- u_int index;
- u_int8_t r, g, b;
+vgafb_setcolor(void *v, u_int index, u_int8_t r, u_int8_t g, u_int8_t b)
{
struct vgafb_softc *sc = v;
@@ -337,10 +321,7 @@ vgafb_setcolor(v, index, r, g, b)
}
paddr_t
-vgafb_mmap(v, off, prot)
- void *v;
- off_t off;
- int prot;
+vgafb_mmap(void *v, off_t off, int prot)
{
struct vgafb_softc *sc = v;
@@ -381,8 +362,7 @@ vgafb_mmap(v, off, prot)
}
int
-vgafb_is_console(node)
- int node;
+vgafb_is_console(int node)
{
extern int fbnode;
@@ -390,9 +370,7 @@ vgafb_is_console(node)
}
int
-vgafb_mapregs(sc, pa)
- struct vgafb_softc *sc;
- struct pci_attach_args *pa;
+vgafb_mapregs(struct vgafb_softc *sc, struct pci_attach_args *pa)
{
bus_addr_t ba;
bus_size_t bs;
diff --git a/sys/arch/sparc64/dev/z8530kbd.c b/sys/arch/sparc64/dev/z8530kbd.c
index cefcfec80d7..169344a6040 100644
--- a/sys/arch/sparc64/dev/z8530kbd.c
+++ b/sys/arch/sparc64/dev/z8530kbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530kbd.c,v 1.28 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: z8530kbd.c,v 1.29 2018/12/27 11:06:38 claudio Exp $ */
/* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */
/*-
@@ -240,10 +240,7 @@ struct wskbd_consops zskbd_consops = {
* zskbd_match: how is this zs channel configured?
*/
int
-zskbd_match(parent, vcf, aux)
- struct device *parent;
- void *vcf;
- void *aux;
+zskbd_match(struct device *parent, void *vcf, void *aux)
{
struct cfdata *cf = vcf;
struct zsc_attach_args *args = aux;
@@ -267,10 +264,7 @@ zskbd_match(parent, vcf, aux)
}
void
-zskbd_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
-
+zskbd_attach(struct device *parent, struct device *self, void *aux)
{
struct zsc_softc *zsc = (void *)parent;
struct zskbd_softc *zst = (void *)self;
@@ -406,8 +400,7 @@ zskbd_attach(parent, self, aux)
}
int
-zskbd_init(zst)
- struct zskbd_softc *zst;
+zskbd_init(struct zskbd_softc *zst)
{
struct sunkbd_softc *ss = (void *)zst;
struct zs_chanstate *cs = zst->zst_cs;
@@ -557,9 +550,7 @@ zskbd_init(zst)
}
void
-zskbd_putc(zst, c)
- struct zskbd_softc *zst;
- u_int8_t c;
+zskbd_putc(struct zskbd_softc *zst, u_int8_t c)
{
u_int8_t rr0;
int s;
@@ -574,10 +565,7 @@ zskbd_putc(zst, c)
}
int
-zsenqueue_tx(v, str, len)
- void *v;
- u_int8_t *str;
- u_int len;
+zsenqueue_tx(void *v, u_int8_t *str, u_int len)
{
struct zskbd_softc *zst = v;
int s;
@@ -600,8 +588,7 @@ zsenqueue_tx(v, str, len)
}
void
-zsstart_tx(zst)
- struct zskbd_softc *zst;
+zsstart_tx(struct zskbd_softc *zst)
{
struct zs_chanstate *cs = zst->zst_cs;
int s, s1;
@@ -641,8 +628,7 @@ out:
* Must be called at splzs().
*/
static void
-zs_maskintr(zst)
- struct zskbd_softc *zst;
+zs_maskintr(struct zskbd_softc *zst)
{
struct zs_chanstate *cs = zst->zst_cs;
int tmp15;
@@ -668,9 +654,7 @@ zs_maskintr(zst)
* in transmission, the change is deferred.
*/
static void
-zs_modem(zst, onoff)
- struct zskbd_softc *zst;
- int onoff;
+zs_modem(struct zskbd_softc *zst, int onoff)
{
struct zs_chanstate *cs = zst->zst_cs;
@@ -697,8 +681,7 @@ zs_modem(zst, onoff)
* called at splzs
*/
static void
-zs_hwiflow(zst)
- struct zskbd_softc *zst;
+zs_hwiflow(struct zskbd_softc *zst)
{
struct zs_chanstate *cs = zst->zst_cs;
@@ -729,8 +712,7 @@ integrate void zskbd_stsoft(struct zskbd_softc *);
* called at splzs
*/
static void
-zskbd_rxint(cs)
- struct zs_chanstate *cs;
+zskbd_rxint(struct zs_chanstate *cs)
{
struct zskbd_softc *zst = cs->cs_private;
u_char *put, *end;
@@ -805,8 +787,7 @@ zskbd_rxint(cs)
* transmitter ready interrupt. (splzs)
*/
static void
-zskbd_txint(cs)
- struct zs_chanstate *cs;
+zskbd_txint(struct zs_chanstate *cs)
{
struct zskbd_softc *zst = cs->cs_private;
@@ -846,9 +827,7 @@ zskbd_txint(cs)
* status change interrupt. (splzs)
*/
static void
-zskbd_stint(cs, force)
- struct zs_chanstate *cs;
- int force;
+zskbd_stint(struct zs_chanstate *cs, int force)
{
struct zskbd_softc *zst = cs->cs_private;
u_char rr0, delta;
@@ -884,8 +863,7 @@ zskbd_stint(cs, force)
}
void
-zskbd_diag(arg)
- void *arg;
+zskbd_diag(void *arg)
{
struct zskbd_softc *zst = arg;
struct sunkbd_softc *ss = arg;
@@ -907,8 +885,7 @@ zskbd_diag(arg)
}
integrate void
-zskbd_rxsoft(zst)
- struct zskbd_softc *zst;
+zskbd_rxsoft(struct zskbd_softc *zst)
{
struct sunkbd_softc *ss = (void *)zst;
struct zs_chanstate *cs = zst->zst_cs;
@@ -981,14 +958,12 @@ zskbd_rxsoft(zst)
}
integrate void
-zskbd_txsoft(zst)
- struct zskbd_softc *zst;
+zskbd_txsoft(struct zskbd_softc *zst)
{
}
integrate void
-zskbd_stsoft(zst)
- struct zskbd_softc *zst;
+zskbd_stsoft(struct zskbd_softc *zst)
{
struct zs_chanstate *cs = zst->zst_cs;
u_char rr0, delta;
@@ -1022,8 +997,7 @@ zskbd_stsoft(zst)
* EITHER the TS_TBLOCK flag or zst_rx_blocked flag is set.
*/
static void
-zskbd_softint(cs)
- struct zs_chanstate *cs;
+zskbd_softint(struct zs_chanstate *cs)
{
struct zskbd_softc *zst = cs->cs_private;
int s;
@@ -1056,9 +1030,7 @@ struct zsops zsops_kbd = {
};
void
-zskbd_cnpollc(v, on)
- void *v;
- int on;
+zskbd_cnpollc(void *v, int on)
{
extern int swallow_zsintrs;
@@ -1069,10 +1041,7 @@ zskbd_cnpollc(v, on)
}
void
-zskbd_cngetc(v, type, data)
- void *v;
- u_int *type;
- int *data;
+zskbd_cngetc(void *v, u_int *type, int *data)
{
struct zskbd_softc *zst = v;
int s;
diff --git a/sys/arch/sparc64/dev/zs.c b/sys/arch/sparc64/dev/zs.c
index dbd2612cc4f..acd7da6439f 100644
--- a/sys/arch/sparc64/dev/zs.c
+++ b/sys/arch/sparc64/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.30 2017/12/30 20:46:59 guenther Exp $ */
+/* $OpenBSD: zs.c,v 1.31 2018/12/27 11:06:38 claudio Exp $ */
/* $NetBSD: zs.c,v 1.29 2001/05/30 15:24:24 lukem Exp $ */
/*-
@@ -170,10 +170,7 @@ static int zs_console_flags(int, int, int);
* Is the zs chip present?
*/
static int
-zs_match_sbus(parent, vcf, aux)
- struct device *parent;
- void *vcf;
- void *aux;
+zs_match_sbus(struct device *parent, void *vcf, void *aux)
{
struct cfdata *cf = vcf;
struct sbus_attach_args *sa = aux;
@@ -185,10 +182,7 @@ zs_match_sbus(parent, vcf, aux)
}
static int
-zs_match_fhc(parent, vcf, aux)
- struct device *parent;
- void *vcf;
- void *aux;
+zs_match_fhc(struct device *parent, void *vcf, void *aux)
{
struct cfdata *cf = vcf;
struct fhc_attach_args *fa = aux;
@@ -199,10 +193,7 @@ zs_match_fhc(parent, vcf, aux)
}
static void
-zs_attach_sbus(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+zs_attach_sbus(struct device *parent, struct device *self, void *aux)
{
struct zsc_softc *zsc = (void *) self;
struct sbus_attach_args *sa = aux;
@@ -248,10 +239,7 @@ zs_attach_sbus(parent, self, aux)
}
static void
-zs_attach_fhc(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+zs_attach_fhc(struct device *parent, struct device *self, void *aux)
{
struct zsc_softc *zsc = (void *) self;
struct fhc_attach_args *fa = aux;
@@ -307,10 +295,7 @@ zs_attach_fhc(parent, self, aux)
* USE ROM PROPERTY keyboard FOR KEYBOARD/MOUSE?
*/
static void
-zs_attach(zsc, zsd, pri)
- struct zsc_softc *zsc;
- struct zsdevice *zsd;
- int pri;
+zs_attach(struct zsc_softc *zsc, struct zsdevice *zsd, int pri)
{
struct zsc_attach_args zsc_args;
struct zs_chanstate *cs;
@@ -436,9 +421,7 @@ zs_attach(zsc, zsd, pri)
}
static int
-zs_print(aux, name)
- void *aux;
- const char *name;
+zs_print(void *aux, const char *name)
{
struct zsc_attach_args *args = aux;
@@ -452,8 +435,7 @@ zs_print(aux, name)
}
static int
-zshard(arg)
- void *arg;
+zshard(void *arg)
{
struct zsc_softc *zsc = (struct zsc_softc *)arg;
int rval = 0;
@@ -470,8 +452,7 @@ zshard(arg)
* We need this only for TTY_DEBUG purposes.
*/
static void
-zssoft(arg)
- void *arg;
+zssoft(void *arg)
{
struct zsc_softc *zsc = (struct zsc_softc *)arg;
int s;
@@ -499,8 +480,7 @@ zssoft(arg)
* Compute the current baud rate given a ZS channel.
*/
static int
-zs_get_speed(cs)
- struct zs_chanstate *cs;
+zs_get_speed(struct zs_chanstate *cs)
{
int tconst;
@@ -513,9 +493,7 @@ zs_get_speed(cs)
* MD functions for setting the baud rate and control modes.
*/
int
-zs_set_speed(cs, bps)
- struct zs_chanstate *cs;
- int bps; /* bits per second */
+zs_set_speed(struct zs_chanstate *cs, int bps)
{
int tconst, real_bps;
@@ -546,9 +524,7 @@ zs_set_speed(cs, bps)
}
int
-zs_set_modes(cs, cflag)
- struct zs_chanstate *cs;
- int cflag;
+zs_set_modes(struct zs_chanstate *cs, int cflag)
{
int s;
@@ -598,9 +574,7 @@ zs_set_modes(cs, cflag)
*/
u_char
-zs_read_reg(cs, reg)
- struct zs_chanstate *cs;
- u_char reg;
+zs_read_reg(struct zs_chanstate *cs, u_char reg)
{
u_char val;
@@ -612,9 +586,7 @@ zs_read_reg(cs, reg)
}
void
-zs_write_reg(cs, reg, val)
- struct zs_chanstate *cs;
- u_char reg, val;
+zs_write_reg(struct zs_chanstate *cs, u_char reg, u_char val)
{
*cs->cs_reg_csr = reg;
ZS_DELAY();
@@ -623,8 +595,7 @@ zs_write_reg(cs, reg, val)
}
u_char
-zs_read_csr(cs)
- struct zs_chanstate *cs;
+zs_read_csr(struct zs_chanstate *cs)
{
u_char val;
@@ -634,17 +605,14 @@ zs_read_csr(cs)
}
void
-zs_write_csr(cs, val)
- struct zs_chanstate *cs;
- u_char val;
+zs_write_csr(struct zs_chanstate *cs, u_char val)
{
*cs->cs_reg_csr = val;
ZS_DELAY();
}
u_char
-zs_read_data(cs)
- struct zs_chanstate *cs;
+zs_read_data(struct zs_chanstate *cs)
{
u_char val;
@@ -654,9 +622,7 @@ zs_read_data(cs)
}
void
-zs_write_data(cs, val)
- struct zs_chanstate *cs;
- u_char val;
+zs_write_data(struct zs_chanstate *cs, u_char val)
{
*cs->cs_reg_data = val;
ZS_DELAY();
@@ -673,8 +639,7 @@ zs_write_data(cs, val)
* Handle user request to enter kernel debugger.
*/
void
-zs_abort(cs)
- struct zs_chanstate *cs;
+zs_abort(struct zs_chanstate *cs)
{
volatile struct zschan *zc = zs_conschan_get;
int rr0;
@@ -707,8 +672,7 @@ zs_abort(cs)
* Polled input char.
*/
int
-zs_getc(arg)
- void *arg;
+zs_getc(void *arg)
{
volatile struct zschan *zc = arg;
int s, c, rr0;
@@ -731,9 +695,7 @@ zs_getc(arg)
* Polled output char.
*/
void
-zs_putc(arg, c)
- void *arg;
- int c;
+zs_putc(void *arg, int c)
{
volatile struct zschan *zc = arg;
int s, rr0;
@@ -770,8 +732,7 @@ zs_putc(arg, c)
* Polled console input putchar.
*/
static int
-zscngetc(dev)
- dev_t dev;
+zscngetc(dev_t dev)
{
return (zs_getc(zs_conschan_get));
}
@@ -780,9 +741,7 @@ zscngetc(dev)
* Polled console output putchar.
*/
static void
-zscnputc(dev, c)
- dev_t dev;
- int c;
+zscnputc(dev_t dev, int c)
{
zs_putc(zs_conschan_put, c);
}
@@ -790,9 +749,7 @@ zscnputc(dev, c)
int swallow_zsintrs;
static void
-zscnpollc(dev, on)
- dev_t dev;
- int on;
+zscnpollc(dev_t dev, int on)
{
/*
* Need to tell zs driver to acknowledge all interrupts or we get
@@ -808,10 +765,7 @@ zscnpollc(dev, on)
}
int
-zs_console_flags(promunit, node, channel)
- int promunit;
- int node;
- int channel;
+zs_console_flags(int promunit, int node, int channel)
{
int cookie, flags = 0;
u_int options;