From 0e224b5dea141aac8acc14bbb896fb4c26ef3283 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sun, 22 Jan 2006 14:03:51 +0000 Subject: [PATCH] * Move function types to a separate line. * Ansify function definitions. * Remove (void) casts for discarded return values. In collaboration with: Alexey Slynko --- sys/bus/cam/cam.h | 5 ++- sys/bus/cam/cam_xpt.c | 11 +++-- sys/bus/cam/scsi/scsi_all.h | 8 ++-- sys/bus/cam/scsi/scsi_ch.c | 4 +- sys/bus/cam/scsi/scsi_da.c | 4 +- sys/bus/cam/scsi/scsi_low.c | 4 +- sys/bus/cam/scsi/scsi_sa.c | 14 +++---- sys/bus/cam/scsi/scsi_ses.c | 26 ++++++------ sys/bus/cam/scsi/scsi_targ_bh.c | 6 +-- sys/bus/eisa/eisaconf.c | 10 ++--- sys/bus/firewire/firewire.c | 12 ++++-- sys/bus/firewire/fwcrom.c | 5 ++- sys/bus/iicbus/i386/pcf.c | 32 ++++++++++----- sys/bus/iicbus/iicbb.c | 46 +++++++++++++-------- sys/bus/isa/i386/isa_dma.c | 15 +++---- sys/bus/isa/pnp.c | 4 +- sys/bus/pccard/pccard_cis_quirks.c | 5 ++- sys/bus/pci/pcisupport.c | 5 ++- sys/bus/usb/ehci.c | 66 ++++++++++++++++++++++++------ sys/bus/usb/usb.c | 11 +++-- sys/bus/usb/usb_ethersubr.c | 5 ++- sys/bus/usb/usb_subr.c | 5 ++- 22 files changed, 182 insertions(+), 121 deletions(-) diff --git a/sys/bus/cam/cam.h b/sys/bus/cam/cam.h index b9f5aa2dc9..c702a5c603 100644 --- a/sys/bus/cam/cam.h +++ b/sys/bus/cam/cam.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/cam.h,v 1.6.2.1 2000/03/17 22:36:21 peter Exp $ - * $DragonFly: src/sys/bus/cam/cam.h,v 1.4 2004/02/16 19:49:28 dillon Exp $ + * $DragonFly: src/sys/bus/cam/cam.h,v 1.5 2006/01/22 14:03:51 swildner Exp $ */ #ifndef _CAM_CAM_H @@ -174,7 +174,8 @@ SYSCTL_DECL(_kern_cam); static __inline void cam_init_pinfo(cam_pinfo *pinfo); -static __inline void cam_init_pinfo(cam_pinfo *pinfo) +static __inline void +cam_init_pinfo(cam_pinfo *pinfo) { pinfo->priority = CAM_PRIORITY_NONE; pinfo->index = CAM_UNQUEUED_INDEX; diff --git a/sys/bus/cam/cam_xpt.c b/sys/bus/cam/cam_xpt.c index c256972db7..44c18b9430 100644 --- a/sys/bus/cam/cam_xpt.c +++ b/sys/bus/cam/cam_xpt.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/cam_xpt.c,v 1.80.2.18 2002/12/09 17:31:55 gibbs Exp $ - * $DragonFly: src/sys/bus/cam/cam_xpt.c,v 1.27 2005/10/13 00:02:25 dillon Exp $ + * $DragonFly: src/sys/bus/cam/cam_xpt.c,v 1.28 2006/01/22 14:03:51 swildner Exp $ */ #include #include @@ -875,14 +875,14 @@ dev_allocq_is_runnable(struct cam_devq *devq) } static void -xpt_periph_init() +xpt_periph_init(void) { cdevsw_add(&xpt_cdevsw, 0, 0); make_dev(&xpt_cdevsw, 0, UID_ROOT, GID_OPERATOR, 0600, "xpt0"); } static void -probe_periph_init() +probe_periph_init(void) { } @@ -1301,8 +1301,7 @@ ptstartover: /* Functions accessed by the peripheral drivers */ static void -xpt_init(dummy) - void *dummy; +xpt_init(void *dummy) { struct cam_sim *xpt_sim; struct cam_path *path; @@ -4487,7 +4486,7 @@ xpt_done(union ccb *done_ccb) } union ccb * -xpt_alloc_ccb() +xpt_alloc_ccb(void) { union ccb *new_ccb; diff --git a/sys/bus/cam/scsi/scsi_all.h b/sys/bus/cam/scsi/scsi_all.h index 3de4ba4b1a..306b2c39a4 100644 --- a/sys/bus/cam/scsi/scsi_all.h +++ b/sys/bus/cam/scsi/scsi_all.h @@ -15,7 +15,7 @@ * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.14.2.5 2003/08/24 03:26:37 ken Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_all.h,v 1.3 2003/12/29 06:42:10 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_all.h,v 1.4 2006/01/22 14:03:51 swildner Exp $ */ /* @@ -906,9 +906,9 @@ static __inline u_int32_t scsi_4btoul(u_int8_t *bytes); static __inline void *find_mode_page_6(struct scsi_mode_header_6 *mode_header); static __inline void *find_mode_page_10(struct scsi_mode_header_10 *mode_header); -static __inline void scsi_extract_sense(struct scsi_sense_data *sense, - int *error_code, int *sense_key, - int *asc, int *ascq) +static __inline void +scsi_extract_sense(struct scsi_sense_data *sense, int *error_code, + int *sense_key, int *asc, int *ascq) { *error_code = sense->error_code & SSD_ERRCODE; *sense_key = sense->flags & SSD_KEY; diff --git a/sys/bus/cam/scsi/scsi_ch.c b/sys/bus/cam/scsi/scsi_ch.c index 5811e1bf3c..36cce368bd 100644 --- a/sys/bus/cam/scsi/scsi_ch.c +++ b/sys/bus/cam/scsi/scsi_ch.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.20.2.2 2000/10/31 08:09:49 dwmalone Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.11 2005/06/02 20:40:31 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.12 2006/01/22 14:03:51 swildner Exp $ */ /* * Derived from the NetBSD SCSI changer driver. @@ -415,7 +415,7 @@ chregister(struct cam_periph *periph, void *arg) * Lock this peripheral until we are setup. * This first call can't block */ - (void)cam_periph_lock(periph, 0); + cam_periph_lock(periph, 0); xpt_schedule(periph, /*priority*/5); return(CAM_REQ_CMP); diff --git a/sys/bus/cam/scsi/scsi_da.c b/sys/bus/cam/scsi/scsi_da.c index f2876ef81a..45bfe72ea9 100644 --- a/sys/bus/cam/scsi/scsi_da.c +++ b/sys/bus/cam/scsi/scsi_da.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.42.2.46 2003/10/21 22:18:19 thomas Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_da.c,v 1.25 2005/09/21 18:58:55 hsu Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_da.c,v 1.26 2006/01/22 14:03:51 swildner Exp $ */ #ifdef _KERNEL @@ -1336,7 +1336,7 @@ daregister(struct cam_periph *periph, void *arg) * Lock this peripheral until we are setup. * This first call can't block */ - (void)cam_periph_lock(periph, 0); + cam_periph_lock(periph, 0); xpt_schedule(periph, /*priority*/5); return(CAM_REQ_CMP); diff --git a/sys/bus/cam/scsi/scsi_low.c b/sys/bus/cam/scsi/scsi_low.c index b36bd3fef6..3072737f16 100644 --- a/sys/bus/cam/scsi/scsi_low.c +++ b/sys/bus/cam/scsi/scsi_low.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/cam/scsi/scsi_low.c,v 1.1.2.5 2003/08/09 06:18:30 non Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_low.c,v 1.14 2005/12/05 03:42:31 swildner Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_low.c,v 1.15 2006/01/22 14:03:51 swildner Exp $ * $NetBSD: scsi_low.c,v 1.24.10.8 2001/06/26 07:39:44 honda Exp $ */ @@ -1307,7 +1307,7 @@ scsi_low_timeout(void *arg) struct scsi_low_softc *slp = arg; crit_enter(); - (void) scsi_low_timeout_check(slp); + scsi_low_timeout_check(slp); (*slp->sl_osdep_fp->scsi_low_osdep_timeout) (slp, SCSI_LOW_TIMEOUT_CH_IO, SCSI_LOW_TIMEOUT_START); crit_exit(); diff --git a/sys/bus/cam/scsi/scsi_sa.c b/sys/bus/cam/scsi/scsi_sa.c index 817ab20c1d..97a75e709a 100644 --- a/sys/bus/cam/scsi/scsi_sa.c +++ b/sys/bus/cam/scsi/scsi_sa.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.45.2.13 2002/12/17 17:08:50 trhodes Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_sa.c,v 1.13 2005/06/02 20:40:31 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_sa.c,v 1.14 2006/01/22 14:03:51 swildner Exp $ * * Implementation of SCSI Sequential Access Peripheral driver for CAM. * @@ -578,8 +578,8 @@ saclose(dev_t dev, int flag, int fmt, struct thread *td) * issues an 'offline' command, that will be allowed * to clear state. */ - (void) sarewind(periph); - (void) saloadunload(periph, FALSE); + sarewind(periph); + saloadunload(periph, FALSE); closedbits |= SA_FLAG_TAPE_MOUNTED|SA_FLAG_TAPE_FROZEN; break; case SA_MODE_REWIND: @@ -1068,7 +1068,7 @@ saioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) break; } case MTREW: /* rewind */ - (void) sacheckeod(periph); + sacheckeod(periph); error = sarewind(periph); /* see above */ softc->flags &= @@ -1090,7 +1090,7 @@ saioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td) break; case MTOFFL: /* rewind and put the drive offline */ - (void) sacheckeod(periph); + sacheckeod(periph); /* see above */ softc->flags &= ~SA_FLAG_TAPE_WRITTEN; softc->filemarks = 0; @@ -1905,7 +1905,7 @@ samount(struct cam_periph *periph, int oflags, dev_t dev) MSG_SIMPLE_Q_TAG, 1, FALSE, 0, 8192, (void *) rblim, 8192, SSD_FULL_SIZE, IO_TIMEOUT); - (void) cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, + cam_periph_runccb(ccb, saerror, 0, SF_NO_PRINT, &softc->device_stats); QFRLS(ccb); scsi_rewind(&ccb->csio, 1, sadone, MSG_SIMPLE_Q_TAG, @@ -2235,7 +2235,7 @@ exit: * so release any device reservation. */ if (error != 0) { - (void) sareservereleaseunit(periph, FALSE); + sareservereleaseunit(periph, FALSE); } else { /* * Clear I/O residual. diff --git a/sys/bus/cam/scsi/scsi_ses.c b/sys/bus/cam/scsi/scsi_ses.c index 15782098a5..c249bae508 100644 --- a/sys/bus/cam/scsi/scsi_ses.c +++ b/sys/bus/cam/scsi/scsi_ses.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.8.2.2 2000/08/08 23:19:21 mjacob Exp $ */ -/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.c,v 1.12 2005/06/02 20:40:31 dillon Exp $ */ +/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.c,v 1.13 2006/01/22 14:03:51 swildner Exp $ */ /* * Copyright (c) 2000 Matthew Jacob * All rights reserved. @@ -1873,10 +1873,10 @@ safte_set_objstat(ses_softc_t *ssc, ses_objstat *obp, int slp) if (err) return (err); if (obp->cstat[3] & SESCTL_RQSTON) { - (void) wrbuf16(ssc, SAFTE_WT_ACTPWS, + wrbuf16(ssc, SAFTE_WT_ACTPWS, idx - cc->pwroff, 0, 0, slp); } else { - (void) wrbuf16(ssc, SAFTE_WT_ACTPWS, + wrbuf16(ssc, SAFTE_WT_ACTPWS, idx - cc->pwroff, 0, 1, slp); } break; @@ -1901,9 +1901,9 @@ safte_set_objstat(ses_softc_t *ssc, ses_objstat *obp, int slp) } else { fsp = 1; } - (void) wrbuf16(ssc, SAFTE_WT_FANSPD, idx, fsp, 0, slp); + wrbuf16(ssc, SAFTE_WT_FANSPD, idx, fsp, 0, slp); } else { - (void) wrbuf16(ssc, SAFTE_WT_FANSPD, idx, 0, 0, slp); + wrbuf16(ssc, SAFTE_WT_FANSPD, idx, 0, 0, slp); } break; case SESTYP_DOORLOCK: @@ -1912,8 +1912,7 @@ safte_set_objstat(ses_softc_t *ssc, ses_objstat *obp, int slp) } else { cc->flag2 |= SAFT_FLG2_LOCKDOOR; } - (void) wrbuf16(ssc, SAFTE_WT_GLOBAL, cc->flag1, - cc->flag2, 0, slp); + wrbuf16(ssc, SAFTE_WT_GLOBAL, cc->flag1, cc->flag2, 0, slp); break; case SESTYP_ALARM: /* @@ -1928,8 +1927,7 @@ safte_set_objstat(ses_softc_t *ssc, ses_objstat *obp, int slp) cc->flag2 &= ~SAFT_FLG1_ALARM; } ep->priv = obp->cstat[3]; - (void) wrbuf16(ssc, SAFTE_WT_GLOBAL, cc->flag1, - cc->flag2, 0, slp); + wrbuf16(ssc, SAFTE_WT_GLOBAL, cc->flag1, cc->flag2, 0, slp); break; default: break; @@ -2405,7 +2403,7 @@ set_objstat_sel(ses_softc_t *ssc, ses_objstat *obp, int slp) * do the 'disable' for a power supply. */ if (obp->cstat[0] & SESCTL_DISABLE) { - (void) wrbuf16(ssc, SAFTE_WT_ACTPWS, + wrbuf16(ssc, SAFTE_WT_ACTPWS, idx - cc->pwroff, 0, 0, slp); } break; @@ -2416,7 +2414,7 @@ set_objstat_sel(ses_softc_t *ssc, ses_objstat *obp, int slp) */ if (obp->cstat[0] & SESCTL_DISABLE) { /* remember- fans are the first items, so idx works */ - (void) wrbuf16(ssc, SAFTE_WT_FANSPD, idx, 0, 0, slp); + wrbuf16(ssc, SAFTE_WT_FANSPD, idx, 0, 0, slp); } break; case SESTYP_DOORLOCK: @@ -2425,7 +2423,7 @@ set_objstat_sel(ses_softc_t *ssc, ses_objstat *obp, int slp) */ if (obp->cstat[0] & SESCTL_DISABLE) { cc->flag2 &= ~SAFT_FLG2_LOCKDOOR; - (void) wrbuf16(ssc, SAFTE_WT_GLOBAL, cc->flag1, + wrbuf16(ssc, SAFTE_WT_GLOBAL, cc->flag1, cc->flag2, 0, slp); } break; @@ -2436,7 +2434,7 @@ set_objstat_sel(ses_softc_t *ssc, ses_objstat *obp, int slp) if (obp->cstat[0] & SESCTL_DISABLE) { cc->flag2 &= ~SAFT_FLG1_ALARM; ep->priv |= 0x40; /* Muted */ - (void) wrbuf16(ssc, SAFTE_WT_GLOBAL, cc->flag1, + wrbuf16(ssc, SAFTE_WT_GLOBAL, cc->flag1, cc->flag2, 0, slp); } break; @@ -2520,7 +2518,7 @@ wrslot_stat(ses_softc_t *ssc, int slp) sdata[1 + (3 * i)] = ep->priv & 0xff; } amt = -(cc->Nslots * 3 + 1); - (void) ses_runcmd(ssc, cdb, 10, sdata, &amt); + ses_runcmd(ssc, cdb, 10, sdata, &amt); SES_FREE(sdata, cc->Nslots * 3 + 1); } diff --git a/sys/bus/cam/scsi/scsi_targ_bh.c b/sys/bus/cam/scsi/scsi_targ_bh.c index 5faa5660e5..465d6a5cd1 100644 --- a/sys/bus/cam/scsi/scsi_targ_bh.c +++ b/sys/bus/cam/scsi/scsi_targ_bh.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.4.2.6 2003/11/14 11:31:25 simokawa Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_targ_bh.c,v 1.9 2005/06/02 20:40:31 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_targ_bh.c,v 1.10 2006/01/22 14:03:51 swildner Exp $ */ #include #include @@ -693,8 +693,8 @@ targbherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) } #endif -static struct targbh_cmd_desc* -targbhallocdescr() +static struct targbh_cmd_desc * +targbhallocdescr(void) { struct targbh_cmd_desc* descr; diff --git a/sys/bus/eisa/eisaconf.c b/sys/bus/eisa/eisaconf.c index 8c3ec4d832..e1252307cf 100644 --- a/sys/bus/eisa/eisaconf.c +++ b/sys/bus/eisa/eisaconf.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/eisa/eisaconf.c,v 1.55 2000/01/14 07:13:57 peter Exp $ - * $DragonFly: src/sys/bus/eisa/eisaconf.c,v 1.5 2004/11/14 15:20:05 joerg Exp $ + * $DragonFly: src/sys/bus/eisa/eisaconf.c,v 1.6 2006/01/22 14:03:51 swildner Exp $ */ #include "opt_eisa.h" @@ -91,7 +91,7 @@ int num_eisa_slots = EISA_SLOTS; static devclass_t eisa_devclass; -static void eisa_reg_print (device_t, char *, char *, int *); +static void eisa_reg_print(device_t, char *, char *, int *); static struct irq_node * eisa_find_irq(struct eisa_device *e_dev, int rid); static struct resvaddr * eisa_find_maddr(struct eisa_device *e_dev, int rid); static struct resvaddr * eisa_find_ioaddr(struct eisa_device *e_dev, int rid); @@ -214,11 +214,7 @@ eisa_probe_nomatch(device_t dev, device_t child) } static void -eisa_reg_print (dev, string, separator, column) - device_t dev; - char * string; - char * separator; - int * column; +eisa_reg_print(device_t dev, char *string, char *separator, int *column) { int length = strlen(string); diff --git a/sys/bus/firewire/firewire.c b/sys/bus/firewire/firewire.c index 1ea3afcb42..119365ef30 100644 --- a/sys/bus/firewire/firewire.c +++ b/sys/bus/firewire/firewire.c @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.68 2004/01/08 14:58:09 simokawa Exp $ - * $DragonFly: src/sys/bus/firewire/firewire.c,v 1.13 2005/10/30 04:41:08 dillon Exp $ + * $DragonFly: src/sys/bus/firewire/firewire.c,v 1.14 2006/01/22 14:03:51 swildner Exp $ * */ @@ -276,7 +276,9 @@ fw_asy_callback(struct fw_xfer *xfer){ /* * Postpone to later retry. */ -void fw_asybusy(struct fw_xfer *xfer){ +void +fw_asybusy(struct fw_xfer *xfer) +{ printf("fw_asybusy\n"); /* xfer->ch = timeout((timeout_t *)fw_asystart, (void *)xfer, 20000); @@ -697,7 +699,8 @@ fw_busreset(struct firewire_comm *fc) } /* Call once after reboot */ -void fw_init(struct firewire_comm *fc) +void +fw_init(struct firewire_comm *fc) { int i; struct csrdir *csrd; @@ -1136,7 +1139,8 @@ fw_print_sid(u_int32_t sid) /* * To receive self ID. */ -void fw_sidrcv(struct firewire_comm* fc, u_int32_t *sid, u_int len) +void +fw_sidrcv(struct firewire_comm* fc, u_int32_t *sid, u_int len) { u_int32_t *p; union fw_self_id *self_id; diff --git a/sys/bus/firewire/fwcrom.c b/sys/bus/firewire/fwcrom.c index d19b909e7f..966c23cbe7 100644 --- a/sys/bus/firewire/fwcrom.c +++ b/sys/bus/firewire/fwcrom.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/bus/firewire/fwcrom.c,v 1.6 2005/03/21 22:07:24 dillon Exp $ + * $DragonFly: src/sys/bus/firewire/fwcrom.c,v 1.7 2006/01/22 14:03:51 swildner Exp $ */ #ifndef __DragonFly__ @@ -552,7 +552,8 @@ crom_load(struct crom_src *src, u_int32_t *buf, int maxlen) #ifdef TEST int -main () { +main(int argc, char *argv[]) +{ struct crom_src src; struct crom_chunk root,unit1,unit2,unit3; struct crom_chunk text1,text2,text3,text4,text5,text6,text7; diff --git a/sys/bus/iicbus/i386/pcf.c b/sys/bus/iicbus/i386/pcf.c index 31def584eb..46f9c8fd81 100644 --- a/sys/bus/iicbus/i386/pcf.c +++ b/sys/bus/iicbus/i386/pcf.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/pcf.c,v 1.14 2000/01/14 00:18:05 nsouch Exp $ - * $DragonFly: src/sys/bus/iicbus/i386/pcf.c,v 1.6 2005/10/12 17:35:46 dillon Exp $ + * $DragonFly: src/sys/bus/iicbus/i386/pcf.c,v 1.7 2006/01/22 14:03:51 swildner Exp $ * */ #include @@ -234,19 +234,22 @@ pcf_print_child(device_t bus, device_t dev) /* * Specific register access to PCF8584 */ -static void PCF_SET_S0(struct pcf_softc *pcf, int data) +static void +PCF_SET_S0(struct pcf_softc *pcf, int data) { outb(pcf->pcf_base, data); pcf_nops(); } -static void PCF_SET_S1(struct pcf_softc *pcf, int data) +static void +PCF_SET_S1(struct pcf_softc *pcf, int data) { outb(pcf->pcf_base+1, data); pcf_nops(); } -static char PCF_GET_S0(struct pcf_softc *pcf) +static char +PCF_GET_S0(struct pcf_softc *pcf) { char data; @@ -256,7 +259,8 @@ static char PCF_GET_S0(struct pcf_softc *pcf) return (data); } -static char PCF_GET_S1(struct pcf_softc *pcf) +static char +PCF_GET_S1(struct pcf_softc *pcf) { char data; @@ -270,7 +274,8 @@ static char PCF_GET_S1(struct pcf_softc *pcf) * Polling mode for master operations wait for a new * byte incomming or outgoing */ -static int pcf_wait_byte(struct pcf_softc *pcf) +static int +pcf_wait_byte(struct pcf_softc *pcf) { int counter = TIMEOUT; @@ -283,7 +288,8 @@ static int pcf_wait_byte(struct pcf_softc *pcf) return (IIC_ETIMEOUT); } -static int pcf_stop(device_t pcfdev) +static int +pcf_stop(device_t pcfdev) { struct pcf_softc *pcf = DEVTOSOFTC(pcfdev); @@ -304,7 +310,8 @@ static int pcf_stop(device_t pcfdev) } -static int pcf_noack(struct pcf_softc *pcf, int timeout) +static int +pcf_noack(struct pcf_softc *pcf, int timeout) { int noack; int k = timeout/10; @@ -319,7 +326,8 @@ static int pcf_noack(struct pcf_softc *pcf, int timeout) return (noack); } -static int pcf_repeated_start(device_t pcfdev, u_char slave, int timeout) +static int +pcf_repeated_start(device_t pcfdev, u_char slave, int timeout) { struct pcf_softc *pcf = DEVTOSOFTC(pcfdev); int error = 0; @@ -348,7 +356,8 @@ error: return (error); } -static int pcf_start(device_t pcfdev, u_char slave, int timeout) +static int +pcf_start(device_t pcfdev, u_char slave, int timeout) { struct pcf_softc *pcf = DEVTOSOFTC(pcfdev); int error = 0; @@ -489,7 +498,8 @@ error: return; } -static int pcf_rst_card(device_t pcfdev, u_char speed, u_char addr, u_char *oldaddr) +static int +pcf_rst_card(device_t pcfdev, u_char speed, u_char addr, u_char *oldaddr) { struct pcf_softc *pcf = DEVTOSOFTC(pcfdev); diff --git a/sys/bus/iicbus/iicbb.c b/sys/bus/iicbus/iicbb.c index d98d7ff7e2..9c77340a9c 100644 --- a/sys/bus/iicbus/iicbb.c +++ b/sys/bus/iicbus/iicbb.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/iicbus/iicbb.c,v 1.6.2.2 2002/04/19 05:52:12 nsouch Exp $ - * $DragonFly: src/sys/bus/iicbus/iicbb.c,v 1.3 2003/08/07 21:16:45 dillon Exp $ + * $DragonFly: src/sys/bus/iicbus/iicbb.c,v 1.4 2006/01/22 14:03:51 swildner Exp $ * */ @@ -110,14 +110,16 @@ static driver_t iicbb_driver = { static devclass_t iicbb_devclass; -static int iicbb_probe(device_t dev) +static int +iicbb_probe(device_t dev) { device_set_desc(dev, "I2C bit-banging driver"); return (0); } -static int iicbb_attach(device_t dev) +static int +iicbb_attach(device_t dev) { struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev); @@ -133,7 +135,8 @@ static int iicbb_attach(device_t dev) return (0); } -static int iicbb_detach(device_t dev) +static int +iicbb_detach(device_t dev) { struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev); @@ -177,7 +180,8 @@ iicbb_print_child(device_t bus, device_t dev) static int i2c_debug = 0; #define I2C_DEBUG(x) if (i2c_debug) (x) -static void iicbb_one(device_t dev) +static void +iicbb_one(device_t dev) { I2C_SET(dev,0,1); I2C_SET(dev,1,1); @@ -185,7 +189,8 @@ static void iicbb_one(device_t dev) return; } -static void iicbb_zero(device_t dev) +static void +iicbb_zero(device_t dev) { I2C_SET(dev,0,0); I2C_SET(dev,1,0); @@ -207,7 +212,8 @@ static void iicbb_zero(device_t dev) * When the SLAVE has pulled this line low the MASTER will take the CLOCK * line low and then the SLAVE will release the SDA (data) line. */ -static int iicbb_ack(device_t dev, int timeout) +static int +iicbb_ack(device_t dev, int timeout) { int noack; int k = timeout/10; @@ -228,7 +234,8 @@ static int iicbb_ack(device_t dev, int timeout) return (noack); } -static void iicbb_sendbyte(device_t dev, u_char data) +static void +iicbb_sendbyte(device_t dev, u_char data) { int i; @@ -239,7 +246,8 @@ static void iicbb_sendbyte(device_t dev, u_char data) return; } -static u_char iicbb_readbyte(device_t dev, int last) +static u_char +iicbb_readbyte(device_t dev, int last) { int i; unsigned char data=0; @@ -257,17 +265,20 @@ static u_char iicbb_readbyte(device_t dev, int last) return data; } -static int iicbb_callback(device_t dev, int index, caddr_t data) +static int +iicbb_callback(device_t dev, int index, caddr_t data) { return (IICBB_CALLBACK(device_get_parent(dev), index, data)); } -static int iicbb_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) +static int +iicbb_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) { return (IICBB_RESET(device_get_parent(dev), speed, addr, oldaddr)); } -static int iicbb_start(device_t dev, u_char slave, int timeout) +static int +iicbb_start(device_t dev, u_char slave, int timeout) { int error; @@ -294,7 +305,8 @@ error: return (error); } -static int iicbb_stop(device_t dev) +static int +iicbb_stop(device_t dev) { I2C_SET(dev,0,0); I2C_SET(dev,1,0); @@ -303,8 +315,8 @@ static int iicbb_stop(device_t dev) return (0); } -static int iicbb_write(device_t dev, char * buf, int len, int *sent, - int timeout) +static int +iicbb_write(device_t dev, char * buf, int len, int *sent, int timeout) { int bytes, error = 0; @@ -327,8 +339,8 @@ error: return (error); } -static int iicbb_read(device_t dev, char * buf, int len, int *read, - int last, int delay) +static int +iicbb_read(device_t dev, char * buf, int len, int *read, int last, int delay) { int bytes; diff --git a/sys/bus/isa/i386/isa_dma.c b/sys/bus/isa/i386/isa_dma.c index d24618f1e0..d70fbe740e 100644 --- a/sys/bus/isa/i386/isa_dma.c +++ b/sys/bus/isa/i386/isa_dma.c @@ -35,7 +35,7 @@ * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 * $FreeBSD: src/sys/i386/isa/isa_dma.c,v 1.4.2.1 2000/08/08 19:49:53 peter Exp $ - * $DragonFly: src/sys/bus/isa/i386/isa_dma.c,v 1.6 2003/11/03 17:11:10 dillon Exp $ + * $DragonFly: src/sys/bus/isa/i386/isa_dma.c,v 1.7 2006/01/22 14:03:51 swildner Exp $ */ /* @@ -92,9 +92,7 @@ static int dmapageport[8] = { 0x87, 0x83, 0x81, 0x82, 0x8f, 0x8b, 0x89, 0x8a }; * Setup a DMA channel's bounce buffer. */ void -isa_dmainit(chan, bouncebufsize) - int chan; - u_int bouncebufsize; +isa_dmainit(int chan, u_int bouncebufsize) { void *buf; @@ -130,8 +128,7 @@ isa_dmainit(chan, bouncebufsize) * in open() or during its initialization. */ int -isa_dma_acquire(chan) - int chan; +isa_dma_acquire(int chan) { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) @@ -153,8 +150,7 @@ isa_dma_acquire(chan) * during close() or during its shutdown. */ void -isa_dma_release(chan) - int chan; +isa_dma_release(int chan) { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) @@ -183,8 +179,7 @@ isa_dma_release(chan) * external dma control by a board. */ void -isa_dmacascade(chan) - int chan; +isa_dmacascade(int chan) { #ifdef DIAGNOSTIC if (chan & ~VALID_DMA_MASK) diff --git a/sys/bus/isa/pnp.c b/sys/bus/isa/pnp.c index 308cab46da..3097aa48a3 100644 --- a/sys/bus/isa/pnp.c +++ b/sys/bus/isa/pnp.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/isa/pnp.c,v 1.5.2.1 2002/10/14 09:31:09 nyan Exp $ - * $DragonFly: src/sys/bus/isa/pnp.c,v 1.8 2005/10/30 04:41:09 dillon Exp $ + * $DragonFly: src/sys/bus/isa/pnp.c,v 1.9 2006/01/22 14:03:51 swildner Exp $ * from: pnp.c,v 1.11 1999/05/06 22:11:19 peter Exp */ @@ -160,7 +160,7 @@ pnp_read(int d) * Intel May 94. */ static void -pnp_send_initiation_key() +pnp_send_initiation_key(void) { int cur, i; diff --git a/sys/bus/pccard/pccard_cis_quirks.c b/sys/bus/pccard/pccard_cis_quirks.c index f375defc04..5c7c2baad3 100644 --- a/sys/bus/pccard/pccard_cis_quirks.c +++ b/sys/bus/pccard/pccard_cis_quirks.c @@ -1,6 +1,6 @@ /* $NetBSD: pcmcia_cis_quirks.c,v 1.6 2000/04/12 21:07:55 scw Exp $ */ /* $FreeBSD: src/sys/dev/pccard/pccard_cis_quirks.c,v 1.7 2002/02/09 21:34:06 imp Exp $ */ -/* $DragonFly: src/sys/bus/pccard/pccard_cis_quirks.c,v 1.2 2004/03/15 17:15:18 dillon Exp $ */ +/* $DragonFly: src/sys/bus/pccard/pccard_cis_quirks.c,v 1.3 2006/01/22 14:03:51 swildner Exp $ */ #define PCCARDDEBUG @@ -207,7 +207,8 @@ static struct pccard_cis_quirk pccard_cis_quirks[] = { static int n_pccard_cis_quirks = sizeof(pccard_cis_quirks)/sizeof(pccard_cis_quirks[0]); -void pccard_check_cis_quirks(device_t dev) +void +pccard_check_cis_quirks(device_t dev) { struct pccard_softc *sc = PCCARD_SOFTC(dev); int wiped = 0; diff --git a/sys/bus/pci/pcisupport.c b/sys/bus/pci/pcisupport.c index 47c0f95227..d335f4d028 100644 --- a/sys/bus/pci/pcisupport.c +++ b/sys/bus/pci/pcisupport.c @@ -1,7 +1,7 @@ /************************************************************************** ** ** $FreeBSD: src/sys/pci/pcisupport.c,v 1.154.2.15 2003/04/29 15:55:06 simokawa Exp $ -** $DragonFly: src/sys/bus/pci/pcisupport.c,v 1.15 2005/06/27 02:27:10 swildner Exp $ +** $DragonFly: src/sys/bus/pci/pcisupport.c,v 1.16 2006/01/22 14:03:51 swildner Exp $ ** ** Device driver for DEC/INTEL PCI chipsets. ** @@ -452,7 +452,8 @@ pci_chip_match(device_t dev) **--------------------------------------------------------- */ -const char* pci_vga_match(device_t dev) +const char * +pci_vga_match(device_t dev) { u_int id = pci_get_devid(dev); const char *vendor, *chip, *type; diff --git a/sys/bus/usb/ehci.c b/sys/bus/usb/ehci.c index 870b514d1b..73bb124d7b 100644 --- a/sys/bus/usb/ehci.c +++ b/sys/bus/usb/ehci.c @@ -1,7 +1,7 @@ /* * $NetBSD: ehci.c,v 1.67 2004/07/06 04:18:05 mycroft Exp $ * $FreeBSD: src/sys/dev/usb/ehci.c,v 1.5 2003/11/10 00:20:52 joe Exp $ - * $DragonFly: src/sys/bus/usb/ehci.c,v 1.15 2005/09/04 05:16:59 dillon Exp $ + * $DragonFly: src/sys/bus/usb/ehci.c,v 1.16 2006/01/22 14:03:51 swildner Exp $ */ /* @@ -1115,7 +1115,7 @@ ehci_dump_regs(ehci_softc_t *sc) * debugger. */ void -ehci_dump() +ehci_dump(void) { ehci_dump_regs(theehci); } @@ -2817,16 +2817,58 @@ ehci_device_bulk_done(usbd_xfer_handle xfer) /************************/ -Static usbd_status ehci_device_intr_transfer(usbd_xfer_handle xfer) { return USBD_IOERROR; } -Static usbd_status ehci_device_intr_start(usbd_xfer_handle xfer) { return USBD_IOERROR; } -Static void ehci_device_intr_abort(usbd_xfer_handle xfer) { } -Static void ehci_device_intr_close(usbd_pipe_handle pipe) { } -Static void ehci_device_intr_done(usbd_xfer_handle xfer) { } +Static usbd_status +ehci_device_intr_transfer(usbd_xfer_handle xfer) +{ + return USBD_IOERROR; +} + +Static usbd_status +ehci_device_intr_start(usbd_xfer_handle xfer) +{ + return USBD_IOERROR; +} + +Static void +ehci_device_intr_abort(usbd_xfer_handle xfer) +{ +} + +Static void +ehci_device_intr_close(usbd_pipe_handle pipe) +{ +} + +Static void +ehci_device_intr_done(usbd_xfer_handle xfer) +{ +} /************************/ -Static usbd_status ehci_device_isoc_transfer(usbd_xfer_handle xfer) { return USBD_IOERROR; } -Static usbd_status ehci_device_isoc_start(usbd_xfer_handle xfer) { return USBD_IOERROR; } -Static void ehci_device_isoc_abort(usbd_xfer_handle xfer) { } -Static void ehci_device_isoc_close(usbd_pipe_handle pipe) { } -Static void ehci_device_isoc_done(usbd_xfer_handle xfer) { } +Static usbd_status +ehci_device_isoc_transfer(usbd_xfer_handle xfer) +{ + return USBD_IOERROR; +} + +Static usbd_status +ehci_device_isoc_start(usbd_xfer_handle xfer) +{ + return USBD_IOERROR; +} + +Static void +ehci_device_isoc_abort(usbd_xfer_handle xfer) +{ +} + +Static void +ehci_device_isoc_close(usbd_pipe_handle pipe) +{ +} + +Static void +ehci_device_isoc_done(usbd_xfer_handle xfer) +{ +} diff --git a/sys/bus/usb/usb.c b/sys/bus/usb/usb.c index 9041f64e6c..f09603a02c 100644 --- a/sys/bus/usb/usb.c +++ b/sys/bus/usb/usb.c @@ -1,7 +1,7 @@ /* * $NetBSD: usb.c,v 1.68 2002/02/20 20:30:12 christos Exp $ * $FreeBSD: src/sys/dev/usb/usb.c,v 1.95 2003/11/09 23:54:21 joe Exp $ - * $DragonFly: src/sys/bus/usb/usb.c,v 1.15 2005/06/02 20:40:40 dillon Exp $ + * $DragonFly: src/sys/bus/usb/usb.c,v 1.16 2006/01/22 14:03:51 swildner Exp $ */ /* Also already merged from NetBSD: @@ -415,11 +415,10 @@ usb_event_thread(void *arg) #endif usb_discover(sc); #ifdef USB_DEBUG - (void)tsleep(&sc->sc_bus->needs_explore, 0, "usbevt", - usb_noexplore ? 0 : hz * 60); + tsleep(&sc->sc_bus->needs_explore, 0, "usbevt", + usb_noexplore ? 0 : hz * 60); #else - (void)tsleep(&sc->sc_bus->needs_explore, 0, "usbevt", - hz * 60); + tsleep(&sc->sc_bus->needs_explore, 0, "usbevt", hz * 60); #endif DPRINTFN(2,("usb_event_thread: woke up\n")); } @@ -808,7 +807,7 @@ usb_add_event(int type, struct usb_event *uep) if (usb_nevents >= USB_MAX_EVENTS) { /* Too many queued events, drop an old one. */ DPRINTF(("usb: event dropped\n")); - (void)usb_get_next_event(&ue); + usb_get_next_event(&ue); } TAILQ_INSERT_TAIL(&usb_events, ueq, next); usb_nevents++; diff --git a/sys/bus/usb/usb_ethersubr.c b/sys/bus/usb/usb_ethersubr.c index 5cc5885925..c7fa78192e 100644 --- a/sys/bus/usb/usb_ethersubr.c +++ b/sys/bus/usb/usb_ethersubr.c @@ -31,7 +31,7 @@ * * * $FreeBSD: src/sys/dev/usb/usb_ethersubr.c,v 1.17 2003/11/14 11:09:45 johan Exp $ - * $DragonFly: src/sys/bus/usb/usb_ethersubr.c,v 1.14 2005/11/28 17:13:23 dillon Exp $ + * $DragonFly: src/sys/bus/usb/usb_ethersubr.c,v 1.15 2006/01/22 14:03:51 swildner Exp $ */ /* @@ -73,7 +73,8 @@ Static int netisr_inited = 0; -Static int usbintr(struct netmsg *msg) +Static int +usbintr(struct netmsg *msg) { struct mbuf *m = ((struct netmsg_packet *)msg)->nm_packet; struct ifnet *ifp; diff --git a/sys/bus/usb/usb_subr.c b/sys/bus/usb/usb_subr.c index 6be7f7721b..c2ee22e832 100644 --- a/sys/bus/usb/usb_subr.c +++ b/sys/bus/usb/usb_subr.c @@ -1,7 +1,7 @@ /* * $NetBSD: usb_subr.c,v 1.99 2002/07/11 21:14:34 augustss Exp $ * $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.58 2003/09/01 07:47:42 ticso Exp $ - * $DragonFly: src/sys/bus/usb/usb_subr.c,v 1.10 2004/03/19 00:35:57 dillon Exp $ + * $DragonFly: src/sys/bus/usb/usb_subr.c,v 1.11 2006/01/22 14:03:51 swildner Exp $ */ /* Also already have from NetBSD: @@ -1362,7 +1362,8 @@ usb_disconnect_port(struct usbd_port *up, device_ptr_t parent) } #ifdef __OpenBSD__ -void *usb_realloc(void *p, u_int size, int pool, int flags) +void * +usb_realloc(void *p, u_int size, int pool, int flags) { void *q; -- 2.41.0