diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-03-05 12:40:15 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-03-05 12:40:15 +0000 |
commit | ec3b725868ec3096d98d97139ede7ae37bf0cc50 (patch) | |
tree | cd986c31ac9759372be3fabb02f7927cd2dc9344 /sys/dev/pci | |
parent | 404a31b0e021e6bd2a6eee790b2c7004e7e07d66 (diff) |
ansi
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/adv_pci.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/adw_pci.c | 11 | ||||
-rw-r--r-- | sys/dev/pci/ahc_pci.c | 16 | ||||
-rw-r--r-- | sys/dev/pci/bktr/bktr_os.c | 17 | ||||
-rw-r--r-- | sys/dev/pci/cac_pci.c | 15 | ||||
-rw-r--r-- | sys/dev/pci/cs4281.c | 69 | ||||
-rw-r--r-- | sys/dev/pci/cy_pci.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/gt/agp_intel_gtt.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/i82365_pci.c | 11 | ||||
-rw-r--r-- | sys/dev/pci/if_ep_pci.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/if_hme_pci.c | 11 | ||||
-rw-r--r-- | sys/dev/pci/if_wb.c | 147 | ||||
-rw-r--r-- | sys/dev/pci/iha_pci.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/pccbb.c | 11 | ||||
-rw-r--r-- | sys/dev/pci/twe_pci.c | 11 |
15 files changed, 113 insertions, 250 deletions
diff --git a/sys/dev/pci/adv_pci.c b/sys/dev/pci/adv_pci.c index 4abc8efa8f7..dc585eea330 100644 --- a/sys/dev/pci/adv_pci.c +++ b/sys/dev/pci/adv_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adv_pci.c,v 1.13 2020/02/18 20:24:52 krw Exp $ */ +/* $OpenBSD: adv_pci.c,v 1.14 2021/03/05 12:40:13 jsg Exp $ */ /* $NetBSD: adv_pci.c,v 1.5 1998/09/26 15:52:55 dante Exp $ */ /* @@ -102,9 +102,7 @@ const struct pci_matchid adv_pci_devices[] = { * the actual probe routine to check it out. */ int -adv_pci_match(parent, match, aux) - struct device *parent; - void *match, *aux; +adv_pci_match(struct device *parent, void *match, void *aux) { return (pci_matchbyid((struct pci_attach_args *)aux, adv_pci_devices, nitems(adv_pci_devices))); @@ -112,9 +110,7 @@ adv_pci_match(parent, match, aux) void -adv_pci_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +adv_pci_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; ASC_SOFTC *sc = (void *) self; diff --git a/sys/dev/pci/adw_pci.c b/sys/dev/pci/adw_pci.c index a895e4aac9e..a6f537f9596 100644 --- a/sys/dev/pci/adw_pci.c +++ b/sys/dev/pci/adw_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adw_pci.c,v 1.18 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: adw_pci.c,v 1.19 2021/03/05 12:40:13 jsg Exp $ */ /* $NetBSD: adw_pci.c,v 1.7 2000/05/26 15:13:46 dante Exp $ */ /* @@ -89,10 +89,7 @@ const struct pci_matchid adw_pci_devices[] = { * the actual probe routine to check it out. */ int -adw_pci_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +adw_pci_match(struct device *parent, void *match, void *aux) { return (pci_matchbyid((struct pci_attach_args *)aux, adw_pci_devices, nitems(adw_pci_devices))); @@ -100,9 +97,7 @@ adw_pci_match(parent, match, aux) void -adw_pci_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +adw_pci_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; ADW_SOFTC *sc = (void *) self; diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c index 3dde810408f..95431f0897b 100644 --- a/sys/dev/pci/ahc_pci.c +++ b/sys/dev/pci/ahc_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahc_pci.c,v 1.59 2020/07/05 21:54:44 krw Exp $ */ +/* $OpenBSD: ahc_pci.c,v 1.60 2021/03/05 12:40:13 jsg Exp $ */ /* $NetBSD: ahc_pci.c,v 1.43 2003/08/18 09:16:22 taca Exp $ */ /* @@ -42,7 +42,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $Id: ahc_pci.c,v 1.59 2020/07/05 21:54:44 krw Exp $ + * $Id: ahc_pci.c,v 1.60 2021/03/05 12:40:13 jsg Exp $ * * //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#57 $ * @@ -648,9 +648,7 @@ struct cfattach ahc_pci_ca = { }; const struct ahc_pci_identity * -ahc_find_pci_device(id, subid, func) - pcireg_t id, subid; - u_int func; +ahc_find_pci_device(pcireg_t id, pcireg_t subid, u_int func) { u_int64_t full_id; const struct ahc_pci_identity *entry; @@ -681,9 +679,7 @@ ahc_find_pci_device(id, subid, func) } int -ahc_pci_probe(parent, match, aux) - struct device *parent; - void *match, *aux; +ahc_pci_probe(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = aux; const struct ahc_pci_identity *entry; @@ -695,9 +691,7 @@ ahc_pci_probe(parent, match, aux) } void -ahc_pci_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +ahc_pci_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; const struct ahc_pci_identity *entry; diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c index 9fc2e08f820..68557e71a40 100644 --- a/sys/dev/pci/bktr/bktr_os.c +++ b/sys/dev/pci/bktr/bktr_os.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bktr_os.c,v 1.33 2020/06/20 16:06:05 krw Exp $ */ +/* $OpenBSD: bktr_os.c,v 1.34 2021/03/05 12:40:14 jsg Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp $ */ /* @@ -133,10 +133,7 @@ struct radio_hw_if bktr_hw_if = { #endif int -bktr_probe(parent, match, aux) - struct device *parent; - void *match; - void *aux; +bktr_probe(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = aux; @@ -258,10 +255,7 @@ bktr_attach(struct device *parent, struct device *self, void *aux) * Special Memory Allocation */ vaddr_t -get_bktr_mem(bktr, dmapp, size) - bktr_ptr_t bktr; - bus_dmamap_t *dmapp; - unsigned int size; +get_bktr_mem(bktr_ptr_t bktr, bus_dmamap_t *dmapp, unsigned int size) { bus_dma_tag_t dmat = bktr->dmat; bus_dma_segment_t seg; @@ -312,10 +306,7 @@ get_bktr_mem(bktr, dmapp, size) } void -free_bktr_mem(bktr, dmap, kva) - bktr_ptr_t bktr; - bus_dmamap_t dmap; - vaddr_t kva; +free_bktr_mem(bktr_ptr_t bktr, bus_dmamap_t dmap, vaddr_t kva) { bus_dma_tag_t dmat = bktr->dmat; diff --git a/sys/dev/pci/cac_pci.c b/sys/dev/pci/cac_pci.c index d413d3bac31..94db97096bd 100644 --- a/sys/dev/pci/cac_pci.c +++ b/sys/dev/pci/cac_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cac_pci.c,v 1.16 2019/12/31 00:16:03 jsg Exp $ */ +/* $OpenBSD: cac_pci.c,v 1.17 2021/03/05 12:40:13 jsg Exp $ */ /* $NetBSD: cac_pci.c,v 1.10 2001/01/10 16:48:04 ad Exp $ */ /*- @@ -109,8 +109,7 @@ struct cac_pci_product { }; const struct cac_pci_type * -cac_pci_findtype(pa) - struct pci_attach_args *pa; +cac_pci_findtype(struct pci_attach_args *pa) { const struct cac_pci_type *ct; const struct cac_pci_product *cp; @@ -145,19 +144,14 @@ cac_pci_findtype(pa) } int -cac_pci_match(parent, match, aux) - struct device *parent; - void *match, *aux; +cac_pci_match(struct device *parent, void *match, void *aux) { return (cac_pci_findtype(aux) != NULL); } void -cac_pci_attach(parent, self, aux) - struct device *parent; - struct device *self; - void *aux; +cac_pci_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa; const struct cac_pci_type *ct; @@ -252,7 +246,6 @@ cac_activate(struct device *self, int act) return (ret); } - void cac_pci_l0_submit(struct cac_softc *sc, struct cac_ccb *ccb) { diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c index 51b5f480ea3..262aea4cfc2 100644 --- a/sys/dev/pci/cs4281.c +++ b/sys/dev/pci/cs4281.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cs4281.c,v 1.37 2019/12/28 07:55:48 fcambus Exp $ */ +/* $OpenBSD: cs4281.c,v 1.38 2021/03/05 12:40:13 jsg Exp $ */ /* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */ /* @@ -246,10 +246,7 @@ struct cfdriver clct_cd = { }; int -cs4281_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +cs4281_match(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; @@ -261,10 +258,7 @@ cs4281_match(parent, match, aux) } void -cs4281_attach(parent, self, aux) - struct device *parent; - struct device *self; - void *aux; +cs4281_attach(struct device *parent, struct device *self, void *aux) { struct cs4281_softc *sc = (struct cs4281_softc *)self; struct pci_attach_args *pa = (struct pci_attach_args *)aux; @@ -340,10 +334,8 @@ cs4281_attach(parent, self, aux) #endif } - int -cs4281_intr(p) - void *p; +cs4281_intr(void *p) { struct cs4281_softc *sc = p; u_int32_t intr, val; @@ -396,10 +388,8 @@ cs4281_intr(p) } int -cs4281_set_params(addr, setmode, usemode, play, rec) - void *addr; - int setmode, usemode; - struct audio_params *play, *rec; +cs4281_set_params(void *addr, int setmode, int usemode, + struct audio_params *play, struct audio_params *rec) { struct cs4281_softc *sc = addr; struct audio_params *p; @@ -451,8 +441,7 @@ cs4281_set_params(addr, setmode, usemode, play, rec) } int -cs4281_halt_output(addr) - void *addr; +cs4281_halt_output(void *addr) { struct cs4281_softc *sc = addr; @@ -464,8 +453,7 @@ cs4281_halt_output(addr) } int -cs4281_halt_input(addr) - void *addr; +cs4281_halt_input(void *addr) { struct cs4281_softc *sc = addr; @@ -477,13 +465,8 @@ cs4281_halt_input(addr) } int -cs4281_trigger_output(addr, start, end, blksize, intr, arg, param) - void *addr; - void *start, *end; - int blksize; - void (*intr)(void *); - void *arg; - struct audio_params *param; +cs4281_trigger_output(void *addr, void *start, void *end, int blksize, + void (*intr)(void *), void *arg, struct audio_params *param) { struct cs4281_softc *sc = addr; u_int32_t fmt = 0; @@ -575,13 +558,8 @@ cs4281_trigger_output(addr, start, end, blksize, intr, arg, param) } int -cs4281_trigger_input(addr, start, end, blksize, intr, arg, param) - void *addr; - void *start, *end; - int blksize; - void (*intr)(void *); - void *arg; - struct audio_params *param; +cs4281_trigger_input(void *addr, void *start, void *end, int blksize, + void (*intr)(void *), void *arg, struct audio_params *param) { struct cs4281_softc *sc = addr; struct cs4281_dma *p; @@ -660,8 +638,7 @@ cs4281_trigger_input(addr, start, end, blksize, intr, arg, param) /* convert sample rate to register value */ u_int8_t -cs4281_sr2regval(rate) - int rate; +cs4281_sr2regval(int rate) { u_int8_t retval; @@ -696,26 +673,20 @@ cs4281_sr2regval(rate) return (retval); } - void -cs4281_set_dac_rate(sc, rate) - struct cs4281_softc *sc; - int rate; +cs4281_set_dac_rate(struct cs4281_softc *sc, int rate) { BA0WRITE4(sc, CS4281_DACSR, cs4281_sr2regval(rate)); } void -cs4281_set_adc_rate(sc, rate) - struct cs4281_softc *sc; - int rate; +cs4281_set_adc_rate(struct cs4281_softc *sc, int rate) { BA0WRITE4(sc, CS4281_ADCSR, cs4281_sr2regval(rate)); } int -cs4281_init(sc) - struct cs4281_softc *sc; +cs4281_init(struct cs4281_softc *sc) { int n; u_int16_t data; @@ -1161,7 +1132,6 @@ cs4281_mixer_get_port(void *addr, mixer_ctrl_t *cp) return (sc->codec_if->vtbl->mixer_get_port(sc->codec_if, cp)); } - int cs4281_query_devinfo(void *addr, mixer_devinfo_t *dip) { @@ -1196,8 +1166,6 @@ cs4281_malloc(void *addr, int direction, size_t size, int pool, int flags) return (KERNADDR(p)); } - - void cs4281_free(void *addr, void *ptr, int pool) { @@ -1248,7 +1216,6 @@ cs4281_attach_codec(void *addr, struct ac97_codec_if *codec_if) return (0); } - int cs4281_read_codec(void *addr, u_int8_t ac97_addr, u_int16_t *ac97_data) { @@ -1374,10 +1341,8 @@ free: return (error); } - int -cs4281_src_wait(sc) - struct cs4281_softc *sc; +cs4281_src_wait(struct cs4281_softc *sc) { int n; diff --git a/sys/dev/pci/cy_pci.c b/sys/dev/pci/cy_pci.c index 1fbf5e8ea8b..265dceedd79 100644 --- a/sys/dev/pci/cy_pci.c +++ b/sys/dev/pci/cy_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy_pci.c,v 1.14 2011/04/03 15:36:02 jasper Exp $ */ +/* $OpenBSD: cy_pci.c,v 1.15 2021/03/05 12:40:13 jsg Exp $ */ /* * Copyright (c) 1996 Timo Rossi. * All rights reserved. @@ -80,18 +80,14 @@ const struct pci_matchid cy_pci_devices[] = { }; int -cy_pci_match(parent, match, aux) - struct device *parent; - void *match, *aux; +cy_pci_match(struct device *parent, void *match, void *aux) { return (pci_matchbyid((struct pci_attach_args *)aux, cy_pci_devices, nitems(cy_pci_devices))); } void -cy_pci_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +cy_pci_attach(struct device *parent, struct device *self, void *aux) { struct cy_pci_softc *psc = (struct cy_pci_softc *)self; struct cy_softc *sc = (struct cy_softc *)self; diff --git a/sys/dev/pci/drm/i915/gt/agp_intel_gtt.c b/sys/dev/pci/drm/i915/gt/agp_intel_gtt.c index 0e02d264eff..3477cfc74dd 100644 --- a/sys/dev/pci/drm/i915/gt/agp_intel_gtt.c +++ b/sys/dev/pci/drm/i915/gt/agp_intel_gtt.c @@ -156,7 +156,7 @@ intel_gtt_chipset_setup(struct drm_device *dev) } int -intel_enable_gtt() +intel_enable_gtt(void) { struct inteldrm_softc *dev_priv = (void *)inteldrm_cd.cd_devs[0]; diff --git a/sys/dev/pci/i82365_pci.c b/sys/dev/pci/i82365_pci.c index b8aaf967931..a7b4a7eb762 100644 --- a/sys/dev/pci/i82365_pci.c +++ b/sys/dev/pci/i82365_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82365_pci.c,v 1.12 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: i82365_pci.c,v 1.13 2021/03/05 12:40:13 jsg Exp $ */ /* $NetBSD: i82365_pci.c,v 1.11 2000/02/24 03:42:44 itohy Exp $ */ /* @@ -84,10 +84,7 @@ static struct pcmcia_chip_functions pcic_pci_functions = { }; int -pcic_pci_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +pcic_pci_match(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *) aux; @@ -100,9 +97,7 @@ pcic_pci_match(parent, match, aux) void pcic_isa_config_interrupts(struct device *); void -pcic_pci_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +pcic_pci_attach(struct device *parent, struct device *self, void *aux) { struct pcic_softc *sc = (void *) self; struct pcic_pci_softc *psc = (void *) self; diff --git a/sys/dev/pci/if_ep_pci.c b/sys/dev/pci/if_ep_pci.c index 183a89f39cd..d500903065c 100644 --- a/sys/dev/pci/if_ep_pci.c +++ b/sys/dev/pci/if_ep_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ep_pci.c,v 1.34 2015/11/24 17:11:39 mpi Exp $ */ +/* $OpenBSD: if_ep_pci.c,v 1.35 2021/03/05 12:40:13 jsg Exp $ */ /* $NetBSD: if_ep_pci.c,v 1.13 1996/10/21 22:56:38 thorpej Exp $ */ /* @@ -89,18 +89,14 @@ const struct pci_matchid ep_pci_devices[] = { }; int -ep_pci_match(parent, match, aux) - struct device *parent; - void *match, *aux; +ep_pci_match(struct device *parent, void *match, void *aux) { return (pci_matchbyid((struct pci_attach_args *)aux, ep_pci_devices, nitems(ep_pci_devices))); } void -ep_pci_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +ep_pci_attach(struct device *parent, struct device *self, void *aux) { struct ep_softc *sc = (void *)self; struct pci_attach_args *pa = aux; diff --git a/sys/dev/pci/if_hme_pci.c b/sys/dev/pci/if_hme_pci.c index 09f2ad5044f..da8714ba640 100644 --- a/sys/dev/pci/if_hme_pci.c +++ b/sys/dev/pci/if_hme_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_hme_pci.c,v 1.22 2019/12/05 12:46:54 mpi Exp $ */ +/* $OpenBSD: if_hme_pci.c,v 1.23 2021/03/05 12:40:13 jsg Exp $ */ /* $NetBSD: if_hme_pci.c,v 1.3 2000/12/28 22:59:13 sommerfeld Exp $ */ /* @@ -77,10 +77,7 @@ struct cfattach hme_pci_ca = { }; int -hmematch_pci(parent, vcf, aux) - struct device *parent; - void *vcf; - void *aux; +hmematch_pci(struct device *parent, void *vcf, void *aux) { struct pci_attach_args *pa = aux; @@ -194,9 +191,7 @@ fail: } void -hmeattach_pci(parent, self, aux) - struct device *parent, *self; - void *aux; +hmeattach_pci(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; struct hme_pci_softc *hsc = (void *)self; diff --git a/sys/dev/pci/if_wb.c b/sys/dev/pci/if_wb.c index 72fba9c7274..0c0a8f823ec 100644 --- a/sys/dev/pci/if_wb.c +++ b/sys/dev/pci/if_wb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wb.c,v 1.72 2020/07/10 13:26:38 patrick Exp $ */ +/* $OpenBSD: if_wb.c,v 1.73 2021/03/05 12:40:13 jsg Exp $ */ /* * Copyright (c) 1997, 1998 @@ -183,9 +183,8 @@ void wb_miibus_statchg(struct device *); /* * Send a read command and address to the EEPROM, check for ACK. */ -void wb_eeprom_putbyte(sc, addr) - struct wb_softc *sc; - int addr; +void +wb_eeprom_putbyte(struct wb_softc *sc, int addr) { int d, i; @@ -213,10 +212,8 @@ void wb_eeprom_putbyte(sc, addr) /* * Read a word of data stored in the EEPROM at address 'addr.' */ -void wb_eeprom_getword(sc, addr, dest) - struct wb_softc *sc; - int addr; - u_int16_t *dest; +void +wb_eeprom_getword(struct wb_softc *sc, int addr, u_int16_t *dest) { int i; u_int16_t word = 0; @@ -254,12 +251,8 @@ void wb_eeprom_getword(sc, addr, dest) /* * Read a sequence of words from the EEPROM. */ -void wb_read_eeprom(sc, dest, off, cnt, swap) - struct wb_softc *sc; - caddr_t dest; - int off; - int cnt; - int swap; +void +wb_read_eeprom(struct wb_softc *sc, caddr_t dest, int off, int cnt, int swap) { int i; u_int16_t word = 0, *ptr; @@ -279,8 +272,8 @@ void wb_read_eeprom(sc, dest, off, cnt, swap) /* * Sync the PHYs by setting data bit and strobing the clock 32 times. */ -void wb_mii_sync(sc) - struct wb_softc *sc; +void +wb_mii_sync(struct wb_softc *sc) { int i; @@ -299,10 +292,8 @@ void wb_mii_sync(sc) /* * Clock a series of bits through the MII. */ -void wb_mii_send(sc, bits, cnt) - struct wb_softc *sc; - u_int32_t bits; - int cnt; +void +wb_mii_send(struct wb_softc *sc, u_int32_t bits, int cnt) { int i; @@ -324,10 +315,8 @@ void wb_mii_send(sc, bits, cnt) /* * Read an PHY register through the MII. */ -int wb_mii_readreg(sc, frame) - struct wb_softc *sc; - struct wb_mii_frame *frame; - +int +wb_mii_readreg(struct wb_softc *sc, struct wb_mii_frame *frame) { int i, ack, s; @@ -420,10 +409,8 @@ fail: /* * Write to a PHY register through the MII. */ -int wb_mii_writereg(sc, frame) - struct wb_softc *sc; - struct wb_mii_frame *frame; - +int +wb_mii_writereg(struct wb_softc *sc, struct wb_mii_frame *frame) { int s; @@ -467,9 +454,7 @@ int wb_mii_writereg(sc, frame) } int -wb_miibus_readreg(dev, phy, reg) - struct device *dev; - int phy, reg; +wb_miibus_readreg(struct device *dev, int phy, int reg) { struct wb_softc *sc = (struct wb_softc *)dev; struct wb_mii_frame frame; @@ -484,9 +469,7 @@ wb_miibus_readreg(dev, phy, reg) } void -wb_miibus_writereg(dev, phy, reg, data) - struct device *dev; - int phy, reg, data; +wb_miibus_writereg(struct device *dev, int phy, int reg, int data) { struct wb_softc *sc = (struct wb_softc *)dev; struct wb_mii_frame frame; @@ -503,8 +486,7 @@ wb_miibus_writereg(dev, phy, reg, data) } void -wb_miibus_statchg(dev) - struct device *dev; +wb_miibus_statchg(struct device *dev) { struct wb_softc *sc = (struct wb_softc *)dev; @@ -514,8 +496,8 @@ wb_miibus_statchg(dev) /* * Program the 64-bit multicast hash filter. */ -void wb_setmulti(sc) - struct wb_softc *sc; +void +wb_setmulti(struct wb_softc *sc) { struct ifnet *ifp; int h = 0; @@ -575,9 +557,7 @@ void wb_setmulti(sc) * first have to put the transmit and/or receive logic in the idle state. */ void -wb_setcfg(sc, media) - struct wb_softc *sc; - uint64_t media; +wb_setcfg(struct wb_softc *sc, uint64_t media) { int i, restart = 0; @@ -614,8 +594,7 @@ wb_setcfg(sc, media) } void -wb_reset(sc) - struct wb_softc *sc; +wb_reset(struct wb_softc *sc) { int i; struct mii_data *mii = &sc->sc_mii; @@ -647,8 +626,7 @@ wb_reset(sc) } void -wb_fixmedia(sc) - struct wb_softc *sc; +wb_fixmedia(struct wb_softc *sc) { struct mii_data *mii = &sc->sc_mii; uint64_t media; @@ -679,9 +657,7 @@ const struct pci_matchid wb_devices[] = { * IDs against our list and return a device name if we find a match. */ int -wb_probe(parent, match, aux) - struct device *parent; - void *match, *aux; +wb_probe(struct device *parent, void *match, void *aux) { return (pci_matchbyid((struct pci_attach_args *)aux, wb_devices, nitems(wb_devices))); @@ -692,9 +668,7 @@ wb_probe(parent, match, aux) * setup and ethernet/BPF attach. */ void -wb_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +wb_attach(struct device *parent, struct device *self, void *aux) { struct wb_softc *sc = (struct wb_softc *)self; struct pci_attach_args *pa = aux; @@ -833,8 +807,8 @@ fail_1: /* * Initialize the transmit descriptors. */ -int wb_list_tx_init(sc) - struct wb_softc *sc; +int +wb_list_tx_init(struct wb_softc *sc) { struct wb_chain_data *cd; struct wb_list_data *ld; @@ -866,8 +840,8 @@ int wb_list_tx_init(sc) * we arrange the descriptors in a closed ring, so that the last descriptor * points back to the first. */ -int wb_list_rx_init(sc) - struct wb_softc *sc; +int +wb_list_rx_init(struct wb_softc *sc) { struct wb_chain_data *cd; struct wb_list_data *ld; @@ -902,9 +876,7 @@ int wb_list_rx_init(sc) * Initialize an RX descriptor and attach an MBUF cluster. */ void -wb_newbuf(sc, c) - struct wb_softc *sc; - struct wb_chain_onefrag *c; +wb_newbuf(struct wb_softc *sc, struct wb_chain_onefrag *c) { c->wb_ptr->wb_data = VTOPHYS(c->wb_buf + sizeof(u_int64_t)); c->wb_ptr->wb_ctl = WB_RXCTL_RLINK | ETHER_MAX_DIX_LEN; @@ -915,8 +887,8 @@ wb_newbuf(sc, c) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -void wb_rxeof(sc) - struct wb_softc *sc; +void +wb_rxeof(struct wb_softc *sc) { struct mbuf_list ml = MBUF_LIST_INITIALIZER(); struct ifnet *ifp; @@ -979,8 +951,8 @@ void wb_rxeof(sc) if_input(ifp, &ml); } -void wb_rxeoc(sc) - struct wb_softc *sc; +void +wb_rxeoc(struct wb_softc *sc) { wb_rxeof(sc); @@ -997,8 +969,8 @@ void wb_rxeoc(sc) * A frame was downloaded to the chip. It's safe for us to clean up * the list buffers. */ -void wb_txeof(sc) - struct wb_softc *sc; +void +wb_txeof(struct wb_softc *sc) { struct wb_chain *cur_tx; struct ifnet *ifp; @@ -1052,8 +1024,8 @@ void wb_txeof(sc) /* * TX 'end of channel' interrupt handler. */ -void wb_txeoc(sc) - struct wb_softc *sc; +void +wb_txeoc(struct wb_softc *sc) { struct ifnet *ifp; @@ -1075,8 +1047,8 @@ void wb_txeoc(sc) return; } -int wb_intr(arg) - void *arg; +int +wb_intr(void *arg) { struct wb_softc *sc; struct ifnet *ifp; @@ -1158,8 +1130,7 @@ int wb_intr(arg) } void -wb_tick(xsc) - void *xsc; +wb_tick(void *xsc) { struct wb_softc *sc = xsc; int s; @@ -1174,10 +1145,8 @@ wb_tick(xsc) * Encapsulate an mbuf chain in a descriptor by coupling the mbuf data * pointers to the fragment pointers. */ -int wb_encap(sc, c, m_head) - struct wb_softc *sc; - struct wb_chain *c; - struct mbuf *m_head; +int +wb_encap(struct wb_softc *sc, struct wb_chain *c, struct mbuf *m_head) { int frag = 0; struct wb_desc *f = NULL; @@ -1267,9 +1236,8 @@ int wb_encap(sc, c, m_head) * copy of the pointers since the transmit list fragment pointers are * physical addresses. */ - -void wb_start(ifp) - struct ifnet *ifp; +void +wb_start(struct ifnet *ifp) { struct wb_softc *sc; struct mbuf *m_head = NULL; @@ -1359,8 +1327,8 @@ void wb_start(ifp) return; } -void wb_init(xsc) - void *xsc; +void +wb_init(void *xsc) { struct wb_softc *sc = xsc; struct ifnet *ifp = &sc->arpcom.ac_if; @@ -1479,8 +1447,7 @@ void wb_init(xsc) * Set media options. */ int -wb_ifmedia_upd(ifp) - struct ifnet *ifp; +wb_ifmedia_upd(struct ifnet *ifp) { struct wb_softc *sc = ifp->if_softc; @@ -1494,9 +1461,7 @@ wb_ifmedia_upd(ifp) * Report current media status. */ void -wb_ifmedia_sts(ifp, ifmr) - struct ifnet *ifp; - struct ifmediareq *ifmr; +wb_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) { struct wb_softc *sc = ifp->if_softc; struct mii_data *mii = &sc->sc_mii; @@ -1506,10 +1471,8 @@ wb_ifmedia_sts(ifp, ifmr) ifmr->ifm_status = mii->mii_media_status; } -int wb_ioctl(ifp, command, data) - struct ifnet *ifp; - u_long command; - caddr_t data; +int +wb_ioctl(struct ifnet *ifp, u_long command, caddr_t data) { struct wb_softc *sc = ifp->if_softc; struct ifreq *ifr = (struct ifreq *) data; @@ -1552,8 +1515,8 @@ int wb_ioctl(ifp, command, data) return(error); } -void wb_watchdog(ifp) - struct ifnet *ifp; +void +wb_watchdog(struct ifnet *ifp) { struct wb_softc *sc; @@ -1579,8 +1542,8 @@ void wb_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -void wb_stop(sc) - struct wb_softc *sc; +void +wb_stop(struct wb_softc *sc) { int i; struct ifnet *ifp; diff --git a/sys/dev/pci/iha_pci.c b/sys/dev/pci/iha_pci.c index d1f37bc3091..45acc63e876 100644 --- a/sys/dev/pci/iha_pci.c +++ b/sys/dev/pci/iha_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iha_pci.c,v 1.18 2020/07/20 14:41:13 krw Exp $ */ +/* $OpenBSD: iha_pci.c,v 1.19 2021/03/05 12:40:13 jsg Exp $ */ /*------------------------------------------------------------------------- * * Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller. @@ -60,10 +60,7 @@ struct scsi_adapter iha_switch = { }; int -iha_pci_probe(parent, match, aux) - struct device *parent; - void *match; - void *aux; +iha_pci_probe(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = aux; @@ -85,10 +82,7 @@ iha_pci_probe(parent, match, aux) } void -iha_pci_attach(parent, self, aux) - struct device *parent; - struct device *self; - void *aux; +iha_pci_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; struct scsibus_attach_args saa; diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index 00b757de9f3..2e9a7eb180c 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.100 2020/03/20 19:32:41 cheloha Exp $ */ +/* $OpenBSD: pccbb.c,v 1.101 2021/03/05 12:40:13 jsg Exp $ */ /* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */ /* @@ -223,10 +223,7 @@ delay_ms(int millis, void *param) } int -pcicbbmatch(parent, match, aux) - struct device *parent; - void *match; - void *aux; +pcicbbmatch(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = (struct pci_attach_args *)aux; @@ -326,9 +323,7 @@ struct yenta_chipinfo { }; int -cb_chipset(pci_id, flagp) - u_int32_t pci_id; - int *flagp; +cb_chipset(u_int32_t pci_id, int *flagp) { struct yenta_chipinfo *yc; diff --git a/sys/dev/pci/twe_pci.c b/sys/dev/pci/twe_pci.c index 02e86eff61a..dd53ac51957 100644 --- a/sys/dev/pci/twe_pci.c +++ b/sys/dev/pci/twe_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: twe_pci.c,v 1.13 2011/04/03 15:36:03 jasper Exp $ */ +/* $OpenBSD: twe_pci.c,v 1.14 2021/03/05 12:40:13 jsg Exp $ */ /* * Copyright (c) 2000 Michael Shalayeff @@ -59,19 +59,14 @@ const struct pci_matchid twe_pci_devices[] = { }; int -twe_pci_match(parent, match, aux) - struct device *parent; - void *match; - void *aux; +twe_pci_match(struct device *parent, void *match, void *aux) { return (pci_matchbyid((struct pci_attach_args *)aux, twe_pci_devices, nitems(twe_pci_devices))); } void -twe_pci_attach(parent, self, aux) - struct device *parent, *self; - void *aux; +twe_pci_attach(struct device *parent, struct device *self, void *aux) { struct twe_softc *sc = (struct twe_softc *)self; struct pci_attach_args *pa = aux; |