diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-10-16 01:22:41 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-10-16 01:22:41 +0000 |
commit | c51dbb356e411b0eb7b415eed894e7707392950d (patch) | |
tree | a203a96c0296c6d64cbf4d42dd84366b9baa4b72 /sys/dev/sbus | |
parent | cd3d72635c607393e202979b0d8b70dfc18f0d5f (diff) |
Change function definitions using the identifier-list form used in the
1st edition of Kernighan and Ritchie's The C Programming Language, to
that of the parameter-type-list form described in the ANSI X3.159-1989
standard.
In ISO/IEC 9899:2023 drafts, there is only one form of function definition.
"N2432 Remove support for function definitions with identifier lists".
ok kettenis@
Diffstat (limited to 'sys/dev/sbus')
-rw-r--r-- | sys/dev/sbus/bwtwo.c | 29 | ||||
-rw-r--r-- | sys/dev/sbus/dma_sbus.c | 6 | ||||
-rw-r--r-- | sys/dev/sbus/qe.c | 69 | ||||
-rw-r--r-- | sys/dev/sbus/qec.c | 42 |
4 files changed, 39 insertions, 107 deletions
diff --git a/sys/dev/sbus/bwtwo.c b/sys/dev/sbus/bwtwo.c index ef130106359..30d346bc377 100644 --- a/sys/dev/sbus/bwtwo.c +++ b/sys/dev/sbus/bwtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwtwo.c,v 1.21 2022/07/15 17:57:27 kettenis Exp $ */ +/* $OpenBSD: bwtwo.c,v 1.22 2022/10/16 01:22:40 jsg Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -126,9 +126,7 @@ struct cfdriver bwtwo_cd = { }; int -bwtwomatch(parent, vcf, aux) - struct device *parent; - void *vcf, *aux; +bwtwomatch(struct device *parent, void *vcf, void *aux) { struct cfdata *cf = vcf; struct sbus_attach_args *sa = aux; @@ -137,9 +135,7 @@ bwtwomatch(parent, vcf, aux) } void -bwtwoattach(parent, self, aux) - struct device *parent, *self; - void *aux; +bwtwoattach(struct device *parent, struct device *self, void *aux) { struct bwtwo_softc *sc = (struct bwtwo_softc *)self; struct sbus_attach_args *sa = aux; @@ -206,12 +202,7 @@ fail: } int -bwtwo_ioctl(v, cmd, data, flags, p) - void *v; - u_long cmd; - caddr_t data; - int flags; - struct proc *p; +bwtwo_ioctl(void *v, u_long cmd, caddr_t data, int flags, struct proc *p) { struct bwtwo_softc *sc = v; struct wsdisplay_fbinfo *wdf; @@ -254,10 +245,7 @@ bwtwo_ioctl(v, cmd, data, flags, p) } paddr_t -bwtwo_mmap(v, offset, prot) - void *v; - off_t offset; - int prot; +bwtwo_mmap(void *v, off_t offset, int prot) { struct bwtwo_softc *sc = v; @@ -272,8 +260,7 @@ bwtwo_mmap(v, offset, prot) } int -bwtwo_is_console(node) - int node; +bwtwo_is_console(int node) { extern int fbnode; @@ -281,9 +268,7 @@ bwtwo_is_console(node) } void -bwtwo_burner(vsc, on, flags) - void *vsc; - u_int on, flags; +bwtwo_burner(void *vsc, u_int on, u_int flags) { struct bwtwo_softc *sc = vsc; int s; diff --git a/sys/dev/sbus/dma_sbus.c b/sys/dev/sbus/dma_sbus.c index 6b0369dd658..5bd1fbcad1c 100644 --- a/sys/dev/sbus/dma_sbus.c +++ b/sys/dev/sbus/dma_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma_sbus.c,v 1.18 2022/03/13 13:34:54 mpi Exp $ */ +/* $OpenBSD: dma_sbus.c,v 1.19 2022/10/16 01:22:40 jsg Exp $ */ /* $NetBSD: dma_sbus.c,v 1.5 2000/07/09 20:57:42 pk Exp $ */ /*- @@ -137,9 +137,7 @@ dmamatch_sbus(struct device *parent, void *vcf, void *aux) } void -dmaattach_sbus(parent, self, aux) - struct device *parent, *self; - void *aux; +dmaattach_sbus(struct device *parent, struct device *self, void *aux) { struct sbus_attach_args *sa = aux; struct dma_softc *dsc = (void *)self; diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c index ced25ec3eb6..c2036e661dc 100644 --- a/sys/dev/sbus/qe.c +++ b/sys/dev/sbus/qe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qe.c,v 1.42 2022/03/13 13:34:54 mpi Exp $ */ +/* $OpenBSD: qe.c,v 1.43 2022/10/16 01:22:40 jsg Exp $ */ /* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */ /*- @@ -157,10 +157,7 @@ struct cfdriver qe_cd = { }; int -qematch(parent, vcf, aux) - struct device *parent; - void *vcf; - void *aux; +qematch(struct device *parent, void *vcf, void *aux) { struct cfdata *cf = vcf; struct sbus_attach_args *sa = aux; @@ -169,9 +166,7 @@ qematch(parent, vcf, aux) } void -qeattach(parent, self, aux) - struct device *parent, *self; - void *aux; +qeattach(struct device *parent, struct device *self, void *aux) { struct sbus_attach_args *sa = aux; struct qec_softc *qec = (struct qec_softc *)parent; @@ -310,9 +305,7 @@ qeattach(parent, self, aux) * we copy into clusters. */ struct mbuf * -qe_get(sc, idx, totlen) - struct qe_softc *sc; - int idx, totlen; +qe_get(struct qe_softc *sc, int idx, int totlen) { struct mbuf *m; struct mbuf *top, **mp; @@ -361,10 +354,7 @@ qe_get(sc, idx, totlen) * network buffer memory. */ __inline__ int -qe_put(sc, idx, m) - struct qe_softc *sc; - int idx; - struct mbuf *m; +qe_put(struct qe_softc *sc, int idx, struct mbuf *m) { struct mbuf *n; int len, tlen = 0, boff = 0; @@ -390,9 +380,7 @@ qe_put(sc, idx, m) * Pass a packet to the higher levels. */ __inline__ void -qe_read(sc, idx, len) - struct qe_softc *sc; - int idx, len; +qe_read(struct qe_softc *sc, int idx, int len) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf_list ml = MBUF_LIST_INITIALIZER(); @@ -431,8 +419,7 @@ qe_read(sc, idx, len) * (i.e. that the output part of the interface is idle) */ void -qestart(ifp) - struct ifnet *ifp; +qestart(struct ifnet *ifp) { struct qe_softc *sc = (struct qe_softc *)ifp->if_softc; struct qec_xd *txd = sc->sc_rb.rb_txd; @@ -486,9 +473,8 @@ qestart(ifp) } void -qestop(sc) - struct qe_softc *sc; -{ +qestop(struct qe_softc *sc) +{ bus_space_tag_t t = sc->sc_bustag; bus_space_handle_t mr = sc->sc_mr; bus_space_handle_t cr = sc->sc_cr; @@ -517,8 +503,7 @@ qestop(sc) * Reset interface. */ void -qereset(sc) - struct qe_softc *sc; +qereset(struct qe_softc *sc) { int s; @@ -529,8 +514,7 @@ qereset(sc) } void -qewatchdog(ifp) - struct ifnet *ifp; +qewatchdog(struct ifnet *ifp) { struct qe_softc *sc = ifp->if_softc; @@ -544,8 +528,7 @@ qewatchdog(ifp) * Interrupt dispatch. */ int -qeintr(arg) - void *arg; +qeintr(void *arg) { struct qe_softc *sc = (struct qe_softc *)arg; bus_space_tag_t t = sc->sc_bustag; @@ -609,8 +592,7 @@ qeintr(arg) * Transmit interrupt. */ int -qe_tint(sc) - struct qe_softc *sc; +qe_tint(struct qe_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; unsigned int bix, txflags; @@ -652,8 +634,7 @@ qe_tint(sc) * Receive interrupt. */ int -qe_rint(sc) - struct qe_softc *sc; +qe_rint(struct qe_softc *sc) { struct qec_xd *xd = sc->sc_rb.rb_rxd; unsigned int bix, len; @@ -702,9 +683,7 @@ qe_rint(sc) * Error interrupt. */ int -qe_eint(sc, why) - struct qe_softc *sc; - u_int32_t why; +qe_eint(struct qe_softc *sc, u_int32_t why) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; int r = 0, rst = 0; @@ -872,10 +851,7 @@ qe_eint(sc, why) } int -qeioctl(ifp, cmd, data) - struct ifnet *ifp; - u_long cmd; - caddr_t data; +qeioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { struct qe_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *)data; @@ -939,8 +915,7 @@ qeioctl(ifp, cmd, data) void -qeinit(sc) - struct qe_softc *sc; +qeinit(struct qe_softc *sc) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; bus_space_tag_t t = sc->sc_bustag; @@ -1044,8 +1019,7 @@ qeinit(sc) * Reset multicast filter. */ void -qe_mcreset(sc) - struct qe_softc *sc; +qe_mcreset(struct qe_softc *sc) { struct arpcom *ac = &sc->sc_arpcom; struct ifnet *ifp = &sc->sc_arpcom.ac_if; @@ -1115,9 +1089,7 @@ qe_mcreset(sc) * Get current media settings. */ void -qe_ifmedia_sts(ifp, ifmr) - struct ifnet *ifp; - struct ifmediareq *ifmr; +qe_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { struct qe_softc *sc = ifp->if_softc; u_int8_t phycc; @@ -1137,8 +1109,7 @@ qe_ifmedia_sts(ifp, ifmr) * Set media options. */ int -qe_ifmedia_upd(ifp) - struct ifnet *ifp; +qe_ifmedia_upd(struct ifnet *ifp) { struct qe_softc *sc = ifp->if_softc; uint64_t media = sc->sc_ifmedia.ifm_media; diff --git a/sys/dev/sbus/qec.c b/sys/dev/sbus/qec.c index 74ea02c4bae..8c37882b454 100644 --- a/sys/dev/sbus/qec.c +++ b/sys/dev/sbus/qec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qec.c,v 1.16 2022/03/13 13:34:54 mpi Exp $ */ +/* $OpenBSD: qec.c,v 1.17 2022/10/16 01:22:40 jsg Exp $ */ /* $NetBSD: qec.c,v 1.12 2000/12/04 20:12:55 fvdl Exp $ */ /*- @@ -76,9 +76,7 @@ struct cfdriver qec_cd = { }; int -qecprint(aux, busname) - void *aux; - const char *busname; +qecprint(void *aux, const char *busname) { struct sbus_attach_args *sa = aux; bus_space_tag_t t = sa->sa_bustag; @@ -91,10 +89,7 @@ qecprint(aux, busname) } int -qecmatch(parent, vcf, aux) - struct device *parent; - void *vcf; - void *aux; +qecmatch(struct device *parent, void *vcf, void *aux) { struct cfdata *cf = vcf; struct sbus_attach_args *sa = aux; @@ -106,9 +101,7 @@ qecmatch(parent, vcf, aux) * Attach all the sub-devices we can find */ void -qecattach(parent, self, aux) - struct device *parent, *self; - void *aux; +qecattach(struct device *parent, struct device *self, void *aux) { struct sbus_attach_args *sa = aux; struct qec_softc *sc = (void *)self; @@ -225,13 +218,8 @@ qecattach(parent, self, aux) } int -qec_bus_map(t, t0, addr, size, flags, hp) - bus_space_tag_t t; - bus_space_tag_t t0; - bus_addr_t addr; - bus_size_t size; - int flags; - bus_space_handle_t *hp; +qec_bus_map(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t addr, + bus_size_t size, int flags, bus_space_handle_t *hp) { struct qec_softc *sc = t->cookie; int slot = BUS_ADDR_IOSPACE(addr); @@ -271,15 +259,8 @@ qec_bus_map(t, t0, addr, size, flags, hp) } void * -qec_intr_establish(t, t0, pri, level, flags, handler, arg, what) - bus_space_tag_t t; - bus_space_tag_t t0; - int pri; - int level; - int flags; - int (*handler)(void *); - void *arg; - const char *what; +qec_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int pri, int level, + int flags, int (*handler)(void *), void *arg, const char *what) { struct qec_softc *sc = t->cookie; @@ -308,8 +289,7 @@ qec_intr_establish(t, t0, pri, level, flags, handler, arg, what) } void -qec_init(sc) - struct qec_softc *sc; +qec_init(struct qec_softc *sc) { bus_space_tag_t t = sc->sc_bustag; bus_space_handle_t qr = sc->sc_regs; @@ -356,9 +336,7 @@ qec_init(sc) * Called from be & qe drivers. */ void -qec_meminit(qr, pktbufsz) - struct qec_ring *qr; - unsigned int pktbufsz; +qec_meminit(struct qec_ring *qr, unsigned int pktbufsz) { bus_addr_t txbufdma, rxbufdma; bus_addr_t dma; |