diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-06-27 01:50:53 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-06-27 01:50:53 +0000 |
commit | 190314899430c56a2537b7571e2e4104fa1055d2 (patch) | |
tree | 51ad264bc7ece760a25e2c53551b55c07e7893ab /sys/dev | |
parent | e141a2db03ba193f83cc7b92697b056689e84f66 (diff) |
ansi functions
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/sbus/apio.c | 31 | ||||
-rw-r--r-- | sys/dev/sbus/asio.c | 28 | ||||
-rw-r--r-- | sys/dev/sbus/be.c | 119 | ||||
-rw-r--r-- | sys/dev/sbus/uperf_sbus.c | 38 |
4 files changed, 56 insertions, 160 deletions
diff --git a/sys/dev/sbus/apio.c b/sys/dev/sbus/apio.c index a237dec08d2..ac7934169ca 100644 --- a/sys/dev/sbus/apio.c +++ b/sys/dev/sbus/apio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apio.c,v 1.6 2003/06/27 00:27:18 jason Exp $ */ +/* $OpenBSD: apio.c,v 1.7 2003/06/27 01:50:52 jason Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -87,10 +87,7 @@ struct cfdriver apio_cd = { }; int -apio_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +apio_match(struct device *parent, void *match, void *aux) { struct sbus_attach_args *sa = aux; @@ -100,9 +97,7 @@ apio_match(parent, match, aux) } void -apio_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +apio_attach(struct device *parent, struct device *self, void *aux) { struct apio_softc *sc = (void *)self; struct sbus_attach_args *sa = aux; @@ -160,9 +155,7 @@ apio_attach(parent, self, aux) } int -apio_print(aux, name) - void *aux; - const char *name; +apio_print(void *aux, const char *name) { struct apio_attach_args *aaa = aux; @@ -187,9 +180,7 @@ struct cfattach lpt_apio_ca = { }; void -apio_intr_enable(dv, en) - struct device *dv; - u_int8_t en; +apio_intr_enable(struct device *dv, u_int8_t en) { struct apio_softc *sc = (struct apio_softc *)dv; u_int8_t csr; @@ -201,18 +192,13 @@ apio_intr_enable(dv, en) } int -lpt_apio_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +lpt_apio_match(struct device *parent, void *match, void *aux) { return (1); } void -lpt_apio_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +lpt_apio_attach(struct device *parent, struct device *self, void *aux) { struct lpt_apio_softc *sc = (struct lpt_apio_softc *)self; struct apio_attach_args *aaa = aux; @@ -233,8 +219,7 @@ lpt_apio_attach(parent, self, aux) } int -lpt_apio_intr(vsc) - void *vsc; +lpt_apio_intr(void *vsc) { struct lpt_apio_softc *sc = vsc; int r; diff --git a/sys/dev/sbus/asio.c b/sys/dev/sbus/asio.c index 81270caa071..7d62ddb55a1 100644 --- a/sys/dev/sbus/asio.c +++ b/sys/dev/sbus/asio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asio.c,v 1.9 2003/06/27 00:27:18 jason Exp $ */ +/* $OpenBSD: asio.c,v 1.10 2003/06/27 01:50:52 jason Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -94,10 +94,7 @@ struct cfdriver asio_cd = { }; int -asio_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +asio_match(struct device *parent, void *match, void *aux) { struct sbus_attach_args *sa = aux; @@ -107,9 +104,7 @@ asio_match(parent, match, aux) } void -asio_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +asio_attach(struct device *parent, struct device *self, void *aux) { struct asio_softc *sc = (void *)self; struct sbus_attach_args *sa = aux; @@ -169,9 +164,7 @@ asio_attach(parent, self, aux) } int -asio_print(aux, name) - void *aux; - const char *name; +asio_print(void *aux, const char *name) { struct asio_attach_args *aaa = aux; @@ -190,9 +183,7 @@ struct cfattach com_asio_ca = { }; void -asio_intr_enable(dv, en) - struct device *dv; - u_int8_t en; +asio_intr_enable(struct device *dv, u_int8_t en) { struct asio_softc *sc = (struct asio_softc *)dv; u_int8_t csr; @@ -204,18 +195,13 @@ asio_intr_enable(dv, en) } int -com_asio_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +com_asio_match(struct device *parent, void *match, void *aux) { return (1); } void -com_asio_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +com_asio_attach(struct device *parent, struct device *self, void *aux) { struct com_softc *sc = (struct com_softc *)self; struct asio_attach_args *aaa = aux; diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c index b8dc96aa2a6..ef784dd9817 100644 --- a/sys/dev/sbus/be.c +++ b/sys/dev/sbus/be.c @@ -1,4 +1,4 @@ -/* $OpenBSD: be.c,v 1.13 2003/06/27 01:36:53 jason Exp $ */ +/* $OpenBSD: be.c,v 1.14 2003/06/27 01:50:52 jason Exp $ */ /* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */ /*- @@ -208,10 +208,7 @@ struct cfdriver be_cd = { }; int -bematch(parent, vcf, aux) - struct device *parent; - void *vcf; - void *aux; +bematch(struct device *parent, void *vcf, void *aux) { struct cfdata *cf = vcf; struct sbus_attach_args *sa = aux; @@ -220,9 +217,7 @@ bematch(parent, vcf, aux) } void -beattach(parent, self, aux) - struct device *parent, *self; - void *aux; +beattach(struct device *parent, struct device *self, void *aux) { struct sbus_attach_args *sa = aux; struct qec_softc *qec = (struct qec_softc *)parent; @@ -471,10 +466,7 @@ beattach(parent, self, aux) * network buffer memory. */ static __inline__ int -be_put(sc, idx, m) - struct be_softc *sc; - int idx; - struct mbuf *m; +be_put(struct be_softc *sc, int idx, struct mbuf *m) { struct mbuf *n; int len, tlen = 0, boff = 0; @@ -503,9 +495,7 @@ be_put(sc, idx, m) * we copy into clusters. */ static __inline__ struct mbuf * -be_get(sc, idx, totlen) - struct be_softc *sc; - int idx, totlen; +be_get(struct be_softc *sc, int idx, int totlen) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; @@ -556,9 +546,7 @@ be_get(sc, idx, totlen) * Pass a packet to the higher levels. */ static __inline__ void -be_read(sc, idx, len) - struct be_softc *sc; - int idx, len; +be_read(struct be_softc *sc, int idx, int len) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; @@ -605,8 +593,7 @@ be_read(sc, idx, len) * (i.e. that the output part of the interface is idle) */ void -bestart(ifp) - struct ifnet *ifp; +bestart(struct ifnet *ifp) { struct be_softc *sc = (struct be_softc *)ifp->if_softc; struct qec_xd *txd = sc->sc_rb.rb_txd; @@ -659,8 +646,7 @@ bestart(ifp) } void -bestop(sc) - struct be_softc *sc; +bestop(struct be_softc *sc) { int n; bus_space_tag_t t = sc->sc_bustag; @@ -693,8 +679,7 @@ bestop(sc) * Reset interface. */ void -bereset(sc) - struct be_softc *sc; +bereset(struct be_softc *sc) { int s; @@ -706,8 +691,7 @@ bereset(sc) } void -bewatchdog(ifp) - struct ifnet *ifp; +bewatchdog(struct ifnet *ifp) { struct be_softc *sc = ifp->if_softc; @@ -717,8 +701,7 @@ bewatchdog(ifp) } int -beintr(v) - void *v; +beintr(void *v) { struct be_softc *sc = (struct be_softc *)v; bus_space_tag_t t = sc->sc_bustag; @@ -749,9 +732,7 @@ beintr(v) * QEC Interrupt. */ int -beqint(sc, why) - struct be_softc *sc; - u_int32_t why; +beqint(struct be_softc *sc, u_int32_t why) { int r = 0, rst = 0; @@ -828,9 +809,7 @@ beqint(sc, why) * Error interrupt. */ int -beeint(sc, why) - struct be_softc *sc; - u_int32_t why; +beeint(struct be_softc *sc, u_int32_t why) { int r = 0, rst = 0; @@ -868,8 +847,7 @@ beeint(sc, why) * Transmit interrupt. */ int -betint(sc) - struct be_softc *sc; +betint(struct be_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; bus_space_tag_t t = sc->sc_bustag; @@ -927,8 +905,7 @@ betint(sc) * Receive interrupt. */ int -berint(sc) - struct be_softc *sc; +berint(struct be_softc *sc) { struct qec_xd *xd = sc->sc_rb.rb_rxd; unsigned int bix, len; @@ -961,10 +938,7 @@ berint(sc) } int -beioctl(ifp, cmd, data) - struct ifnet *ifp; - u_long cmd; - caddr_t data; +beioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct be_softc *sc = ifp->if_softc; struct ifaddr *ifa = (struct ifaddr *)data; @@ -1071,8 +1045,7 @@ beioctl(ifp, cmd, data) void -beinit(sc) - struct be_softc *sc; +beinit(struct be_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; bus_space_tag_t t = sc->sc_bustag; @@ -1166,8 +1139,7 @@ beinit(sc) } void -be_mcreset(sc) - struct be_softc *sc; +be_mcreset(struct be_softc *sc) { struct arpcom *ac = &sc->sc_arpcom; struct ifnet *ifp = &sc->sc_arpcom.ac_if; @@ -1253,8 +1225,7 @@ chipit: * Set the tcvr to an idle state */ void -be_mii_sync(sc) - struct be_softc *sc; +be_mii_sync(struct be_softc *sc) { bus_space_tag_t t = sc->sc_bustag; bus_space_handle_t tr = sc->sc_tr; @@ -1272,9 +1243,7 @@ be_mii_sync(sc) } void -be_pal_gate(sc, phy) - struct be_softc *sc; - int phy; +be_pal_gate(struct be_softc *sc, int phy) { bus_space_tag_t t = sc->sc_bustag; bus_space_handle_t tr = sc->sc_tr; @@ -1291,9 +1260,7 @@ be_pal_gate(sc, phy) } static int -be_tcvr_read_bit(sc, phy) - struct be_softc *sc; - int phy; +be_tcvr_read_bit(struct be_softc *sc, int phy) { bus_space_tag_t t = sc->sc_bustag; bus_space_handle_t tr = sc->sc_tr; @@ -1321,10 +1288,7 @@ be_tcvr_read_bit(sc, phy) } static void -be_tcvr_write_bit(sc, phy, bit) - struct be_softc *sc; - int phy; - int bit; +be_tcvr_write_bit(struct be_softc *sc, int phy, int bit) { bus_space_tag_t t = sc->sc_bustag; bus_space_handle_t tr = sc->sc_tr; @@ -1344,11 +1308,7 @@ be_tcvr_write_bit(sc, phy, bit) } static void -be_mii_sendbits(sc, phy, data, nbits) - struct be_softc *sc; - int phy; - u_int32_t data; - int nbits; +be_mii_sendbits(struct be_softc *sc, int phy, u_int32_t data, int nbits) { int i; @@ -1357,9 +1317,7 @@ be_mii_sendbits(sc, phy, data, nbits) } static int -be_mii_readreg(self, phy, reg) - struct device *self; - int phy, reg; +be_mii_readreg(struct device *self, int phy, int reg) { struct be_softc *sc = (struct be_softc *)self; int val = 0, i; @@ -1387,9 +1345,7 @@ be_mii_readreg(self, phy, reg) } void -be_mii_writereg(self, phy, reg, val) - struct device *self; - int phy, reg, val; +be_mii_writereg(struct device *self, int phy, int reg, int val) { struct be_softc *sc = (struct be_softc *)self; int i; @@ -1411,9 +1367,7 @@ be_mii_writereg(self, phy, reg, val) } int -be_mii_reset(sc, phy) - struct be_softc *sc; - int phy; +be_mii_reset(struct be_softc *sc, int phy) { int n; @@ -1436,8 +1390,7 @@ be_mii_reset(sc, phy) } void -be_tick(arg) - void *arg; +be_tick(void *arg) { struct be_softc *sc = arg; int s = splnet(); @@ -1450,8 +1403,7 @@ be_tick(arg) } void -be_mii_statchg(self) - struct device *self; +be_mii_statchg(struct device *self) { struct be_softc *sc = (struct be_softc *)self; bus_space_tag_t t = sc->sc_bustag; @@ -1481,9 +1433,7 @@ be_mii_statchg(self) * Get current media settings. */ void -be_ifmedia_sts(ifp, ifmr) - struct ifnet *ifp; - struct ifmediareq *ifmr; +be_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { struct be_softc *sc = ifp->if_softc; @@ -1499,8 +1449,7 @@ be_ifmedia_sts(ifp, ifmr) * Set media options. */ int -be_ifmedia_upd(ifp) - struct ifnet *ifp; +be_ifmedia_upd(struct ifnet *ifp) { struct be_softc *sc = ifp->if_softc; int error; @@ -1515,10 +1464,7 @@ be_ifmedia_upd(ifp) * Service routine for our pseudo-MII internal transceiver. */ int -be_intphy_service(sc, mii, cmd) - struct be_softc *sc; - struct mii_data *mii; - int cmd; +be_intphy_service(struct be_softc *sc, struct mii_data *mii, int cmd) { struct ifmedia_entry *ife = mii->mii_media.ifm_cur; int bmcr, bmsr; @@ -1673,8 +1619,7 @@ be_intphy_service(sc, mii, cmd) * Determine status of internal transceiver */ void -be_intphy_status(sc) - struct be_softc *sc; +be_intphy_status(struct be_softc *sc) { struct mii_data *mii = &sc->sc_mii; int media_active, media_status; diff --git a/sys/dev/sbus/uperf_sbus.c b/sys/dev/sbus/uperf_sbus.c index 4246e4f192f..d0ee1821f4c 100644 --- a/sys/dev/sbus/uperf_sbus.c +++ b/sys/dev/sbus/uperf_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uperf_sbus.c,v 1.6 2003/06/02 18:32:41 jason Exp $ */ +/* $OpenBSD: uperf_sbus.c,v 1.7 2003/06/27 01:50:52 jason Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -98,9 +98,7 @@ struct uperf_src uperf_sbus_srcs[] = { }; int -uperf_sbus_match(parent, vcf, aux) - struct device *parent; - void *vcf, *aux; +uperf_sbus_match(struct device *parent, void *vcf, void *aux) { struct sbus_attach_args *sa = aux; @@ -108,9 +106,7 @@ uperf_sbus_match(parent, vcf, aux) } void -uperf_sbus_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +uperf_sbus_attach(struct device *parent, struct device *self, void *aux) { struct sbus_attach_args *sa = aux; struct uperf_sbus_softc *sc = (struct uperf_sbus_softc *)self; @@ -152,9 +148,7 @@ uperf_sbus_attach(parent, self, aux) * Read from an indirect register */ u_int32_t -uperf_sbus_read_reg(sc, r) - struct uperf_sbus_softc *sc; - bus_size_t r; +uperf_sbus_read_reg(struct uperf_sbus_softc *sc, bus_size_t r) { u_int32_t v; int s; @@ -193,10 +187,7 @@ uperf_sbus_read_reg(sc, r) * Write to an indirect register */ void -uperf_sbus_write_reg(sc, r, v) - struct uperf_sbus_softc *sc; - bus_size_t r; - u_int32_t v; +uperf_sbus_write_reg(struct uperf_sbus_softc *sc, bus_size_t r, u_int32_t v) { int s; @@ -230,9 +221,7 @@ uperf_sbus_write_reg(sc, r, v) } int -uperf_sbus_clrcnt(vsc, flags) - void *vsc; - int flags; +uperf_sbus_clrcnt(void *vsc, int flags) { struct uperf_sbus_softc *sc = vsc; u_int32_t clr = 0, oldsrc; @@ -249,10 +238,7 @@ uperf_sbus_clrcnt(vsc, flags) } int -uperf_sbus_setcntsrc(vsc, flags, src0, src1) - void *vsc; - int flags; - u_int src0, src1; +uperf_sbus_setcntsrc(void *vsc, int flags, u_int src0, u_int src1) { struct uperf_sbus_softc *sc = vsc; u_int32_t src; @@ -271,10 +257,7 @@ uperf_sbus_setcntsrc(vsc, flags, src0, src1) } int -uperf_sbus_getcntsrc(vsc, flags, srcp0, srcp1) - void *vsc; - int flags; - u_int *srcp0, *srcp1; +uperf_sbus_getcntsrc(void *vsc, int flags, u_int *srcp0, u_int *srcp1) { struct uperf_sbus_softc *sc = vsc; u_int32_t src; @@ -288,10 +271,7 @@ uperf_sbus_getcntsrc(vsc, flags, srcp0, srcp1) } int -uperf_sbus_getcnt(vsc, flags, cntp0, cntp1) - void *vsc; - int flags; - u_int32_t *cntp0, *cntp1; +uperf_sbus_getcnt(void *vsc, int flags, u_int32_t *cntp0, u_int32_t *cntp1) { struct uperf_sbus_softc *sc = vsc; u_int32_t c0, c1; |