From 47d381f7459befb118ddf7dceadd89e8d19c9a0e Mon Sep 17 00:00:00 2001 From: jsg Date: Sat, 15 Oct 2022 08:41:18 +0000 Subject: [PATCH] ansi --- sys/arch/macppc/dev/i2s.c | 61 +++++++++----------------------- sys/arch/macppc/dev/if_wi_obio.c | 24 ++++--------- sys/arch/macppc/dev/mediabay.c | 27 +++++--------- 3 files changed, 32 insertions(+), 80 deletions(-) diff --git a/sys/arch/macppc/dev/i2s.c b/sys/arch/macppc/dev/i2s.c index f6160955ef1..b87711a0497 100644 --- a/sys/arch/macppc/dev/i2s.c +++ b/sys/arch/macppc/dev/i2s.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i2s.c,v 1.34 2016/09/14 06:12:19 ratchov Exp $ */ +/* $OpenBSD: i2s.c,v 1.35 2022/10/15 08:41:18 jsg Exp $ */ /* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */ /*- @@ -127,8 +127,7 @@ i2s_attach(struct device *parent, struct i2s_softc *sc, struct confargs *ca) } int -i2s_intr(v) - void *v; +i2s_intr(void *v) { struct i2s_softc *sc = v; struct dbdma_command *cmd = sc->sc_odmap; @@ -162,8 +161,7 @@ i2s_intr(v) } int -i2s_iintr(v) - void *v; +i2s_iintr(void *v) { struct i2s_softc *sc = v; struct dbdma_command *cmd = sc->sc_idmap; @@ -197,9 +195,7 @@ i2s_iintr(v) } int -i2s_open(h, flags) - void *h; - int flags; +i2s_open(void *h, int flags) { return 0; } @@ -208,8 +204,7 @@ i2s_open(h, flags) * Close function is called at splaudio(). */ void -i2s_close(h) - void *h; +i2s_close(void *h) { struct i2s_softc *sc = h; @@ -221,10 +216,8 @@ i2s_close(h) } int -i2s_set_params(h, setmode, usemode, play, rec) - void *h; - int setmode, usemode; - struct audio_params *play, *rec; +i2s_set_params(void *h, int setmode, int usemode, struct audio_params *play, + struct audio_params *rec) { struct i2s_softc *sc = h; struct audio_params *p; @@ -276,9 +269,7 @@ i2s_set_params(h, setmode, usemode, play, rec) } int -i2s_round_blocksize(h, size) - void *h; - int size; +i2s_round_blocksize(void *h, int size) { if (size < NBPG) size = NBPG; @@ -286,8 +277,7 @@ i2s_round_blocksize(h, size) } int -i2s_halt_output(h) - void *h; +i2s_halt_output(void *h) { struct i2s_softc *sc = h; @@ -297,8 +287,7 @@ i2s_halt_output(h) } int -i2s_halt_input(h) - void *h; +i2s_halt_input(void *h) { struct i2s_softc *sc = h; @@ -584,10 +573,7 @@ i2s_query_devinfo(void *h, mixer_devinfo_t *dip) } size_t -i2s_round_buffersize(h, dir, size) - void *h; - int dir; - size_t size; +i2s_round_buffersize(void *h, int dir, size_t size) { if (size > 65536) size = 65536; @@ -595,20 +581,14 @@ i2s_round_buffersize(h, dir, size) } int -i2s_get_props(h) - void *h; +i2s_get_props(void *h) { return AUDIO_PROP_FULLDUPLEX /* | AUDIO_PROP_MMAP */; } int -i2s_trigger_output(h, start, end, bsize, intr, arg, param) - void *h; - void *start, *end; - int bsize; - void (*intr)(void *); - void *arg; - struct audio_params *param; +i2s_trigger_output(void *h, void *start, void *end, int bsize, + void (*intr)(void *), void *arg, struct audio_params *param) { struct i2s_softc *sc = h; struct i2s_dma *p; @@ -648,13 +628,8 @@ i2s_trigger_output(h, start, end, bsize, intr, arg, param) } int -i2s_trigger_input(h, start, end, bsize, intr, arg, param) - void *h; - void *start, *end; - int bsize; - void (*intr)(void *); - void *arg; - struct audio_params *param; +i2s_trigger_input(void *h, void *start, void *end, int bsize, + void (*intr)(void *), void *arg, struct audio_params *param) { struct i2s_softc *sc = h; struct i2s_dma *p; @@ -702,9 +677,7 @@ i2s_trigger_input(h, start, end, bsize, intr, arg, param) * rate = SCLK / 64 ( = LRCLK = fs) */ int -i2s_set_rate(sc, rate) - struct i2s_softc *sc; - int rate; +i2s_set_rate(struct i2s_softc *sc, int rate) { u_int reg = 0; int MCLK; diff --git a/sys/arch/macppc/dev/if_wi_obio.c b/sys/arch/macppc/dev/if_wi_obio.c index da30b7d2172..89e91a68b44 100644 --- a/sys/arch/macppc/dev/if_wi_obio.c +++ b/sys/arch/macppc/dev/if_wi_obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_obio.c,v 1.20 2022/03/13 12:33:01 mpi Exp $ */ +/* $OpenBSD: if_wi_obio.c,v 1.21 2022/10/15 08:41:18 jsg Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -89,9 +89,7 @@ const struct cfattach wi_obio_ca = { int -wi_obio_match(parent, match, aux) - struct device *parent; - void *match, *aux; +wi_obio_match(struct device *parent, void *match, void *aux) { struct confargs *ca = aux; @@ -102,9 +100,7 @@ wi_obio_match(parent, match, aux) } void -wi_obio_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +wi_obio_attach(struct device *parent, struct device *self, void *aux) { struct wi_obio_softc *psc = (struct wi_obio_softc *)self; struct wi_softc *sc = &psc->sc_wi; @@ -135,9 +131,7 @@ wi_obio_attach(parent, self, aux) } int -wi_obio_detach(dev, flags) - struct device *dev; - int flags; +wi_obio_detach(struct device *dev, int flags) { struct wi_obio_softc *psc = (struct wi_obio_softc *)dev; struct wi_softc *sc = &psc->sc_wi; @@ -156,9 +150,7 @@ wi_obio_detach(dev, flags) } int -wi_obio_activate(dev, act) - struct device *dev; - int act; +wi_obio_activate(struct device *dev, int act) { struct wi_obio_softc *psc = (struct wi_obio_softc *)dev; struct wi_softc *sc = &psc->sc_wi; @@ -181,8 +173,7 @@ wi_obio_activate(dev, act) /* THIS IS CRAP */ int -wi_obio_enable(sc) - struct wi_softc *sc; +wi_obio_enable(struct wi_softc *sc) { struct wi_obio_softc *psc = (struct wi_obio_softc *)sc; const u_int keywest = psc->keywest; /* XXX */ @@ -224,8 +215,7 @@ wi_obio_enable(sc) } void -wi_obio_disable(sc) - struct wi_softc *sc; +wi_obio_disable(struct wi_softc *sc) { struct wi_obio_softc *psc = (struct wi_obio_softc *)sc; const u_int keywest = psc->keywest; /* XXX */ diff --git a/sys/arch/macppc/dev/mediabay.c b/sys/arch/macppc/dev/mediabay.c index 139f40e589a..fbf5bfdfa26 100644 --- a/sys/arch/macppc/dev/mediabay.c +++ b/sys/arch/macppc/dev/mediabay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mediabay.c,v 1.8 2022/03/13 12:33:01 mpi Exp $ */ +/* $OpenBSD: mediabay.c,v 1.9 2022/10/15 08:41:18 jsg Exp $ */ /* $NetBSD: mediabay.c,v 1.9 2003/07/15 02:43:29 lukem Exp $ */ /*- @@ -86,10 +86,7 @@ struct cfdriver mediabay_cd = { #define MEDIABAY_ID_NONE 7 int -mediabay_match(parent, v, aux) - struct device *parent; - void *v; - void *aux; +mediabay_match(struct device *parent, void *v, void *aux) { struct confargs *ca = aux; @@ -104,9 +101,7 @@ mediabay_match(parent, v, aux) * Attach all the sub-devices we can find */ void -mediabay_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +mediabay_attach(struct device *parent, struct device *self, void *aux) { struct mediabay_softc *sc = (struct mediabay_softc *)self; struct confargs *ca = aux; @@ -139,8 +134,7 @@ mediabay_attach(parent, self, aux) } void -mediabay_attach_content(sc) - struct mediabay_softc *sc; +mediabay_attach_content(struct mediabay_softc *sc) { int child; u_int fcr; @@ -195,9 +189,7 @@ mediabay_attach_content(sc) } int -mediabay_print(aux, mediabay) - void *aux; - const char *mediabay; +mediabay_print(void *aux, const char *mediabay) { struct confargs *ca = aux; @@ -208,8 +200,7 @@ mediabay_print(aux, mediabay) } int -mediabay_intr(v) - void *v; +mediabay_intr(void *v) { struct mediabay_softc *sc = v; @@ -218,8 +209,7 @@ mediabay_intr(v) } void -mediabay_create_kthread(v) - void *v; +mediabay_create_kthread(void *v) { struct mediabay_softc *sc = v; @@ -228,8 +218,7 @@ mediabay_create_kthread(v) } void -mediabay_kthread(v) - void *v; +mediabay_kthread(void *v) { struct mediabay_softc *sc = v; u_int x, fcr; -- 2.20.1