Date: Sat, 24 Nov 2007 19:07:55 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 129463 for review Message-ID: <200711241907.lAOJ7tWK064337@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=129463 Change 129463 by hselasky@hselasky_laptop001 on 2007/11/24 19:07:46 Style change. "Values in return statements should be enclosed in parentheses" according to "man style". The editing was done using hybrid methods. Suggested by Alfred Perlstein. Affected files ... .. //depot/projects/usb/src/sys/arm/at91/ohci_atmelarm.c#7 edit .. //depot/projects/usb/src/sys/dev/ata/ata-usb.c#24 edit .. //depot/projects/usb/src/sys/dev/if_ndis/if_ndis_usb.c#6 edit .. //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#22 edit .. //depot/projects/usb/src/sys/dev/sound/usb/uaudio_pcm.c#9 edit .. //depot/projects/usb/src/sys/dev/usb/ehci.c#49 edit .. //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#25 edit .. //depot/projects/usb/src/sys/dev/usb/if_aue.c#35 edit .. //depot/projects/usb/src/sys/dev/usb/if_axe.c#36 edit .. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#28 edit .. //depot/projects/usb/src/sys/dev/usb/if_cue.c#31 edit .. //depot/projects/usb/src/sys/dev/usb/if_kue.c#33 edit .. //depot/projects/usb/src/sys/dev/usb/if_rue.c#31 edit .. //depot/projects/usb/src/sys/dev/usb/if_rum.c#15 edit .. //depot/projects/usb/src/sys/dev/usb/if_udav.c#32 edit .. //depot/projects/usb/src/sys/dev/usb/if_ural.c#39 edit .. //depot/projects/usb/src/sys/dev/usb/if_zyd.c#21 edit .. //depot/projects/usb/src/sys/dev/usb/ohci.c#39 edit .. //depot/projects/usb/src/sys/dev/usb/ohci_pci.c#25 edit .. //depot/projects/usb/src/sys/dev/usb/uark.c#11 edit .. //depot/projects/usb/src/sys/dev/usb/ubsa.c#28 edit .. //depot/projects/usb/src/sys/dev/usb/ubser.c#20 edit .. //depot/projects/usb/src/sys/dev/usb/ucom.c#22 edit .. //depot/projects/usb/src/sys/dev/usb/ucycom.c#22 edit .. //depot/projects/usb/src/sys/dev/usb/udbp.c#17 edit .. //depot/projects/usb/src/sys/dev/usb/ufm.c#17 edit .. //depot/projects/usb/src/sys/dev/usb/ufoma.c#28 edit .. //depot/projects/usb/src/sys/dev/usb/uftdi.c#25 edit .. //depot/projects/usb/src/sys/dev/usb/ugen.c#27 edit .. //depot/projects/usb/src/sys/dev/usb/ugensa.c#12 edit .. //depot/projects/usb/src/sys/dev/usb/uhci.c#41 edit .. //depot/projects/usb/src/sys/dev/usb/uhci_pci.c#24 edit .. //depot/projects/usb/src/sys/dev/usb/uhid.c#22 edit .. //depot/projects/usb/src/sys/dev/usb/uhub.c#21 edit .. //depot/projects/usb/src/sys/dev/usb/uipaq.c#11 edit .. //depot/projects/usb/src/sys/dev/usb/ukbd.c#28 edit .. //depot/projects/usb/src/sys/dev/usb/ulpt.c#28 edit .. //depot/projects/usb/src/sys/dev/usb/umass.c#31 edit .. //depot/projects/usb/src/sys/dev/usb/umct.c#22 edit .. //depot/projects/usb/src/sys/dev/usb/umodem.c#31 edit .. //depot/projects/usb/src/sys/dev/usb/umoscom.c#9 edit .. //depot/projects/usb/src/sys/dev/usb/ums.c#29 edit .. //depot/projects/usb/src/sys/dev/usb/uplcom.c#29 edit .. //depot/projects/usb/src/sys/dev/usb/urio.c#17 edit .. //depot/projects/usb/src/sys/dev/usb/usb.c#22 edit .. //depot/projects/usb/src/sys/dev/usb/usb_cdev.c#19 edit .. //depot/projects/usb/src/sys/dev/usb/usb_compat_linux.c#11 edit .. //depot/projects/usb/src/sys/dev/usb/usb_hid.c#9 edit .. //depot/projects/usb/src/sys/dev/usb/usb_requests.c#10 edit .. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#50 edit .. //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#46 edit .. //depot/projects/usb/src/sys/dev/usb/uscanner.c#15 edit .. //depot/projects/usb/src/sys/dev/usb/uvisor.c#25 edit .. //depot/projects/usb/src/sys/dev/usb/uvscom.c#28 edit .. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c#18 edit .. //depot/projects/usb/src/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c#14 edit Differences ... ==== //depot/projects/usb/src/sys/arm/at91/ohci_atmelarm.c#7 (text) ==== @@ -69,12 +69,12 @@ int rid; if (sc == NULL) { - return ENXIO; + return (ENXIO); } if (usbd_bus_mem_setup(&(sc->sc_ohci.sc_bus), device_get_dma_tag(dev), sizeof(*(sc->sc_ohci.sc_bus.hw_ptr.ohci)), 32, LOG2(OHCI_HCCA_ALIGN))) { device_printf(dev, "Could not allocate DMA-able memory\n"); - return ENOMEM; + return (ENOMEM); } sc->iclk = at91_pmc_clock_ref("ohci_clk"); sc->fclk = at91_pmc_clock_ref("uhpck"); @@ -139,11 +139,11 @@ if (err) { goto error; } - return 0; + return (0); error: ohci_atmelarm_detach(dev); - return ENXIO; + return (ENXIO); } static int @@ -199,7 +199,7 @@ mtx_destroy(&(sc->sc_ohci.sc_bus.mtx)); - return 0; + return (0); } static device_method_t ohci_methods[] = { ==== //depot/projects/usb/src/sys/dev/ata/ata-usb.c#24 (text) ==== @@ -287,11 +287,11 @@ usb_interface_descriptor_t *id; if (uaa->iface == NULL) { - return UMATCH_NONE; + return (UMATCH_NONE); } id = usbd_get_interface_descriptor(uaa->iface); if ((!id) || (id->bInterfaceClass != UICLASS_MASS)) { - return UMATCH_NONE; + return (UMATCH_NONE); } switch (id->bInterfaceSubClass) { case UISUBCLASS_QIC157: @@ -305,13 +305,13 @@ case UIPROTO_MASS_CBI_I: case UIPROTO_MASS_BBB: case UIPROTO_MASS_BBB_OLD: - return UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO; + return (UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO); default: - return UMATCH_IFACECLASS_IFACESUBCLASS; + return (UMATCH_IFACECLASS_IFACESUBCLASS); } break; default: - return UMATCH_IFACECLASS; + return (UMATCH_IFACECLASS); } } @@ -329,7 +329,7 @@ int err; if (sc == NULL) { - return ENOMEM; + return (ENOMEM); } usbd_set_desc(dev, uaa->device); @@ -425,11 +425,11 @@ } bus_generic_attach(sc->dev); - return 0; + return (0); detach: atausb_detach(dev); - return ENXIO; + return (ENXIO); } static int @@ -452,7 +452,7 @@ free(children, M_TEMP); } mtx_destroy(&sc->locked_mtx); - return 0; + return (0); } static void @@ -923,7 +923,7 @@ done: mtx_unlock(&sc->locked_mtx); - return error; + return (error); } static int @@ -963,7 +963,7 @@ } request->result = 0; } - return ATA_OP_FINISHED; + return (ATA_OP_FINISHED); } static int @@ -988,7 +988,7 @@ snprintf(buffer, sizeof(buffer), "USB lun %d", ch->unit); device_set_desc_copy(dev, buffer); - return 0; + return (0); } static int @@ -1017,7 +1017,7 @@ if (!ata_delayed_attach) { ata_identify(dev); } - return 0; + return (0); } static int @@ -1036,7 +1036,7 @@ } mtx_destroy(&ch->state_mtx); mtx_destroy(&ch->queue_mtx); - return 0; + return (0); } static void @@ -1076,7 +1076,7 @@ sc->restart_ch = NULL; mtx_unlock(&sc->locked_mtx); ata_start(ch->dev); - return res; + return (res); } } break; @@ -1088,7 +1088,7 @@ res = sc->locked_ch->unit; } mtx_unlock(&sc->locked_mtx); - return res; + return (res); } static device_method_t ata_usbchannel_methods[] = { ==== //depot/projects/usb/src/sys/dev/if_ndis/if_ndis_usb.c#6 (text+ko) ==== @@ -112,12 +112,12 @@ struct usb_attach_arg *uaa = device_get_ivars(dev); if (windrv_lookup(0, "USB Bus") == NULL) { - return UMATCH_NONE; + return (UMATCH_NONE); } if (uaa->iface != NULL) { - return UMATCH_NONE; + return (UMATCH_NONE); } - return UMATCH_NONE; + return (UMATCH_NONE); } static int @@ -134,9 +134,9 @@ windrv_create_pdo(drv, dev); if (ndis_attach(dev) != 0) { - return ENXIO; + return (ENXIO); } - return 0; /* success */ + return (0); /* success */ } static struct resource_list * ==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio.c#22 (text+ko) ==== @@ -650,7 +650,7 @@ usb_interface_descriptor_t *id; if (uaa->iface == NULL) { - return UMATCH_NONE; + return (UMATCH_NONE); } id = usbd_get_interface_descriptor(uaa->iface); @@ -660,9 +660,9 @@ (id->bInterfaceClass != UICLASS_AUDIO) || (id->bInterfaceSubClass != UISUBCLASS_AUDIOCONTROL) || (usbd_get_quirks(uaa->device)->uq_flags & UQ_BAD_AUDIO)) { - return UMATCH_NONE; + return (UMATCH_NONE); } - return UMATCH_IFACECLASS_IFACESUBCLASS; + return (UMATCH_IFACECLASS_IFACESUBCLASS); } static int @@ -674,7 +674,7 @@ device_t child; if (sc == NULL) { - return ENOMEM; + return (ENOMEM); } sc->sc_play_chan.priv_sc = sc; sc->sc_rec_chan.priv_sc = sc; @@ -752,11 +752,11 @@ DPRINTF(0, "child attach failed\n"); goto detach; } - return 0; /* success */ + return (0); /* success */ detach: uaudio_detach(dev); - return ENXIO; + return (ENXIO); } static void @@ -815,11 +815,11 @@ } pcm_setstatus(dev, status); - return 0; /* success */ + return (0); /* success */ detach: uaudio_detach_sub(dev); - return ENXIO; + return (ENXIO); } int @@ -840,7 +840,7 @@ panic("Please don't detach your sound device " "while it is in use. This is not supported yet!\n"); } - return 0; /* success */ + return (0); /* success */ } static int @@ -856,7 +856,7 @@ umidi_detach(dev); - return 0; + return (0); } /*========================================================================* @@ -1430,11 +1430,11 @@ DPRINTF(0, "could not allocate USB transfers!\n"); goto error; } - return ch; + return (ch); error: uaudio_chan_free(ch); - return NULL; + return (NULL); } int @@ -1448,7 +1448,7 @@ ch->valid = 0; - return 0; + return (0); } int @@ -1460,7 +1460,7 @@ uaudio_chan_set_param_fragments(ch, blocksize, max / blocksize); - return ch->block_size; + return (ch->block_size); } int @@ -1491,7 +1491,7 @@ } ch->block_size = sndbuf_getblksz(ch->pcm_buf); - return 1; + return (1); } int @@ -1500,7 +1500,7 @@ if (speed != ch->sample_rate) { DPRINTF(0, "rate conversion required\n"); } - return ch->sample_rate; + return (ch->sample_rate); } int @@ -1519,7 +1519,7 @@ uaudio_chan_set_param_format(struct uaudio_chan *ch, uint32_t format) { ch->format = format; - return 0; + return (0); } int @@ -1536,7 +1536,7 @@ if (ch->xfer[1]) { usbd_transfer_start(ch->xfer[1]); } - return 0; + return (0); } int @@ -1547,7 +1547,7 @@ #endif usbd_transfer_stop(ch->xfer[0]); usbd_transfer_stop(ch->xfer[1]); - return 0; + return (0); } /*========================================================================* @@ -1813,7 +1813,7 @@ } } } - return temp; + return (temp); } static void @@ -2179,7 +2179,7 @@ if (u.desc->bLength < len) { goto error; } - return u.desc; + return (u.desc); error: if (u.desc) { @@ -2189,7 +2189,7 @@ u.desc->bDescriptorSubtype, u.desc->bLength, len); } - return NULL; + return (NULL); } #ifdef USB_DEBUG @@ -2283,7 +2283,7 @@ DPRINTF(0, "bad data\n"); bzero(&r, sizeof(r)); done: - return r; + return (r); } #ifdef USB_DEBUG @@ -2383,7 +2383,7 @@ if (uat->terminal_type == 0) { DPRINTF(0, "unknown terminal type (0x%04x)", terminal_type); } - return uat->desc; + return (uat->desc); } #endif @@ -2438,7 +2438,7 @@ */ mix->class = UAC_OUTPUT; done: - return terminal_type; + return (terminal_type); } struct uaudio_tt_to_feature { @@ -2537,7 +2537,7 @@ uint16_t terminal_type = uaudio_mixer_determine_class(iot, mix); if ((mix->class == UAC_RECORD) && (terminal_type == 0)) { - return SOUND_MIXER_IMIX; + return (SOUND_MIXER_IMIX); } while (uat->terminal_type) { if (uat->terminal_type == terminal_type) { @@ -2568,7 +2568,7 @@ } } while (n--); - return NULL; + return (NULL); } const static struct uaudio_terminal_node * @@ -2586,7 +2586,7 @@ } } while (n--); - return NULL; + return (NULL); } static void @@ -2952,7 +2952,7 @@ usbd_status err; if (mc->wValue[0] == -1) { - return 0; + return (0); } req.bmRequestType = UT_READ_CLASS_INTERFACE; req.bRequest = what; @@ -2963,7 +2963,7 @@ err = usbd_do_request(udev, &Giant, &req, data); if (err) { DPRINTF(0, "err=%s\n", usbd_errstr(err)); - return 0; + return (0); } if (len < 1) { data[0] = 0; @@ -2975,7 +2975,7 @@ DPRINTF(2, "val=%d\n", val); - return val; + return (val); } static void @@ -3074,7 +3074,7 @@ data[1] = speed >> 8; data[2] = speed >> 16; - return usbd_do_request(udev, &Giant, &req, data); + return (usbd_do_request(udev, &Giant, &req, data)); } static int @@ -3087,7 +3087,7 @@ val = (int8_t)val; } } - return val; + return (val); } static int @@ -3108,7 +3108,7 @@ } DPRINTF(5, "val=%d\n", val); - return val; + return (val); } static void @@ -3169,7 +3169,7 @@ sc->sc_mixer_xfer, uaudio_mixer_config, 1, sc, sc->sc_mixer_lock)) { DPRINTF(0, "could not allocate USB transfer for audio mixer!\n"); - return ENOMEM; + return (ENOMEM); } if (!(sc->sc_mix_info & SOUND_MASK_VOLUME)) { mix_setparentchild(m, SOUND_MIXER_VOLUME, SOUND_MASK_PCM); @@ -3177,7 +3177,7 @@ } mix_setdevs(m, sc->sc_mix_info); mix_setrecdevs(m, sc->sc_recsrc_info); - return 0; + return (0); } int @@ -3187,7 +3187,7 @@ usbd_transfer_unsetup(sc->sc_mixer_xfer, 1); - return 0; + return (0); } void @@ -3232,7 +3232,7 @@ } } } - return src; + return (src); } /*========================================================================* @@ -3338,7 +3338,7 @@ * USB MIDI packets, derives from Linux's usbmidi.c, which * was written by "Clemens Ladisch": * - * return values: + * Returns: * 0: No command * Else: Command is complete */ @@ -3353,7 +3353,7 @@ sub->temp_0[2] = 0; sub->temp_0[3] = 0; sub->temp_cmd = sub->temp_0; - return 1; + return (1); } else if (b >= 0xf0) { switch (b) { @@ -3381,7 +3381,7 @@ sub->temp_1[3] = 0; sub->temp_cmd = sub->temp_1; sub->state = UMIDI_ST_UNKNOWN; - return 1; + return (1); case 0xf7: /* system exclusive end */ switch (sub->state) { @@ -3392,20 +3392,20 @@ sub->temp_1[3] = 0; sub->temp_cmd = sub->temp_1; sub->state = UMIDI_ST_UNKNOWN; - return 1; + return (1); case UMIDI_ST_SYSEX_1: sub->temp_1[0] = p0 | 0x06; sub->temp_1[2] = 0xf7; sub->temp_1[3] = 0; sub->temp_cmd = sub->temp_1; sub->state = UMIDI_ST_UNKNOWN; - return 1; + return (1); case UMIDI_ST_SYSEX_2: sub->temp_1[0] = p0 | 0x07; sub->temp_1[3] = 0xf7; sub->temp_cmd = sub->temp_1; sub->state = UMIDI_ST_UNKNOWN; - return 1; + return (1); } sub->state = UMIDI_ST_UNKNOWN; break; @@ -3430,7 +3430,7 @@ sub->temp_1[2] = b; sub->temp_1[3] = 0; sub->temp_cmd = sub->temp_1; - return 1; + return (1); case UMIDI_ST_2PARAM_1: sub->temp_1[2] = b; sub->state = UMIDI_ST_2PARAM_2; @@ -3446,7 +3446,7 @@ sub->temp_1[0] = p0; sub->temp_1[3] = b; sub->temp_cmd = sub->temp_1; - return 1; + return (1); case UMIDI_ST_SYSEX_0: sub->temp_1[1] = b; sub->state = UMIDI_ST_SYSEX_1; @@ -3460,10 +3460,10 @@ sub->temp_1[3] = b; sub->temp_cmd = sub->temp_1; sub->state = UMIDI_ST_SYSEX_0; - return 1; + return (1); } } - return 0; + return (0); } static void @@ -3575,14 +3575,14 @@ for (n = 0; n < UMIDI_CABLES_MAX; n++) { sub = &(chan->sub[n]); if ((&(sub->cdev)) == cdev) { - return sub; + return (sub); } } panic("%s:%d cannot find usb_cdev!\n", __FILE__, __LINE__); - return NULL; + return (NULL); } static void @@ -3661,14 +3661,14 @@ /* reset */ sub->state = UMIDI_ST_UNKNOWN; } - return 0; /* success */ + return (0); /* success */ } static int32_t umidi_ioctl(struct usb_cdev *cdev, u_long cmd, caddr_t data, int32_t fflags, struct thread *td) { - return ENODEV; + return (ENODEV); } static void @@ -3753,10 +3753,10 @@ mtx_unlock(&(chan->mtx)); - return 0; /* success */ + return (0); /* success */ detach: - return ENXIO; /* failure */ + return (ENXIO); /* failure */ } static int32_t @@ -3781,7 +3781,7 @@ mtx_destroy(&(chan->mtx)); - return 0; + return (0); } DRIVER_MODULE(uaudio, uhub, uaudio_driver, uaudio_devclass, usbd_driver_load, 0); ==== //depot/projects/usb/src/sys/dev/sound/usb/uaudio_pcm.c#9 (text+ko) ==== @@ -39,13 +39,13 @@ static void * ua_chan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c, int dir) { - return uaudio_chan_init(devinfo, b, c, dir); + return (uaudio_chan_init(devinfo, b, c, dir)); } static int ua_chan_free(kobj_t obj, void *data) { - return uaudio_chan_free(data); + return (uaudio_chan_free(data)); } static int @@ -55,50 +55,50 @@ * At this point, no need to query as we * shouldn't select an unsorted format */ - return uaudio_chan_set_param_format(data, format); + return (uaudio_chan_set_param_format(data, format)); } static int ua_chan_setspeed(kobj_t obj, void *data, uint32_t speed) { - return uaudio_chan_set_param_speed(data, speed); + return (uaudio_chan_set_param_speed(data, speed)); } static int ua_chan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) { - return uaudio_chan_set_param_blocksize(data, blocksize); + return (uaudio_chan_set_param_blocksize(data, blocksize)); } static int ua_chan_setfragments(kobj_t obj, void *data, uint32_t blocksize, uint32_t blockcount) { - return uaudio_chan_set_param_fragments(data, blocksize, blockcount); + return (uaudio_chan_set_param_fragments(data, blocksize, blockcount)); } static int ua_chan_trigger(kobj_t obj, void *data, int go) { if (!PCMTRIG_COMMON(go)) { - return 0; + return (0); } if (go == PCMTRIG_START) { - return uaudio_chan_start(data); + return (uaudio_chan_start(data)); } else { - return uaudio_chan_stop(data); + return (uaudio_chan_stop(data)); } } static int ua_chan_getptr(kobj_t obj, void *data) { - return uaudio_chan_getptr(data); + return (uaudio_chan_getptr(data)); } static struct pcmchan_caps * ua_chan_getcaps(kobj_t obj, void *data) { - return uaudio_chan_getcaps(data); + return (uaudio_chan_getcaps(data)); } static kobj_method_t ua_chan_methods[] = { @@ -120,7 +120,7 @@ static int ua_mixer_init(struct snd_mixer *m) { - return uaudio_mixer_init_sub(mix_getdevinfo(m), m); + return (uaudio_mixer_init_sub(mix_getdevinfo(m), m)); } static int @@ -143,13 +143,13 @@ snd_mtxlock(mtx); /* XXX */ retval = uaudio_mixer_setrecsrc(mix_getdevinfo(m), src); snd_mtxunlock(mtx); /* XXX */ - return retval; + return (retval); } static int ua_mixer_uninit(struct snd_mixer *m) { - return uaudio_mixer_uninit_sub(mix_getdevinfo(m)); + return (uaudio_mixer_uninit_sub(mix_getdevinfo(m))); } static kobj_method_t ua_mixer_methods[] = { @@ -176,23 +176,23 @@ if ((func == NULL) || (func->func != SCF_PCM)) { - return ENXIO; + return (ENXIO); } device_set_desc(dev, "USB audio"); - return BUS_PROBE_DEFAULT; + return (BUS_PROBE_DEFAULT); } static int ua_attach(device_t dev) { - return uaudio_attach_sub(dev, &ua_mixer_class, &ua_chan_class); + return (uaudio_attach_sub(dev, &ua_mixer_class, &ua_chan_class)); } static int ua_detach(device_t dev) { - return uaudio_detach_sub(dev); + return (uaudio_detach_sub(dev)); } /************************************************************/ ==== //depot/projects/usb/src/sys/dev/usb/ehci.c#49 (text+ko) ==== @@ -689,7 +689,7 @@ ehci_dump_qtd(sqtd); temp = (sqtd->qtd_next & htole32(EHCI_LINK_TERMINATE)) ? 1 : 0; usbd_page_dma_enter(sqtd->page); - return temp; + return (temp); } static void @@ -1302,10 +1302,10 @@ done: DPRINTFN(12, ("xfer=%p is still active\n", xfer)); - return 0; + return (0); transferred: - return 1; + return (1); } static void @@ -2027,7 +2027,7 @@ xfer->aframes = xfer->nframes; - return need_delay; + return (need_delay); } static uint8_t @@ -2091,7 +2091,7 @@ } xfer->aframes = xfer->nframes; - return need_delay; + return (need_delay); } /* NOTE: "done" can be run two times in a row, ==== //depot/projects/usb/src/sys/dev/usb/ehci_pci.c#25 (text+ko) ==== @@ -105,7 +105,7 @@ if (err) return (err); ehci_suspend(sc); - return 0; + return (0); } static int @@ -118,7 +118,7 @@ bus_generic_resume(self); - return 0; + return (0); } static int @@ -133,7 +133,7 @@ ehci_shutdown(sc); ehci_pci_givecontroller(self); - return 0; + return (0); } static const char * @@ -188,7 +188,7 @@ && (pci_get_progif(self) == PCI_INTERFACE_EHCI)) { return ("EHCI (generic) USB 2.0 controller"); } - return NULL; /* dunno */ + return (NULL); /* dunno */ } static int @@ -198,9 +198,9 @@ if (desc) { device_set_desc(self, desc); - return 0; + return (0); } else { - return ENXIO; + return (ENXIO); } } @@ -213,12 +213,12 @@ if (sc == NULL) { device_printf(self, "Could not allocate sc\n"); - return ENXIO; + return (ENXIO); } if (usbd_bus_mem_setup(&(sc->sc_bus), device_get_dma_tag(self), sizeof(*(sc->sc_bus.hw_ptr.ehci)), 32, LOG2(EHCI_FRAMELIST_ALIGN))) { device_printf(self, "Could not allocate DMA-able memory\n"); - return ENOMEM; + return (ENOMEM); } mtx_init(&sc->sc_bus.mtx, "usb lock", NULL, MTX_DEF | MTX_RECURSE); @@ -233,7 +233,7 @@ case PCI_USBREV_1_1: sc->sc_bus.usbrev = USBREV_UNKNOWN; printf("pre-2.0 USB rev\n"); - return ENXIO; + return (ENXIO); case PCI_USBREV_2_0: sc->sc_bus.usbrev = USBREV_2_0; break; @@ -268,7 +268,10 @@ device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); device_set_softc(sc->sc_bus.bdev, &sc->sc_bus); - /* ehci_pci_match will never return NULL if ehci_pci_probe succeeded */ + /* + * ehci_pci_match will never return NULL if ehci_pci_probe + * succeeded + */ device_set_desc(sc->sc_bus.bdev, ehci_pci_match(self)); switch (pci_get_vendor(self)) { case PCI_EHCI_VENDORID_ACERLABS: @@ -342,11 +345,11 @@ device_printf(self, "USB init failed err=%d\n", err); goto error; } - return 0; >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711241907.lAOJ7tWK064337>