Module Name:    src
Committed By:   skrll
Date:           Sun Mar 13 07:01:43 UTC 2016

Modified Files:
        src/sys/dev/usb: ehci.c ohci.c uaudio.c ugen.c uhci.c uhub.c

Log Message:
KNF


To generate a diff of this commit:
cvs rdiff -u -r1.247 -r1.248 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.258 -r1.259 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.144 -r1.145 src/sys/dev/usb/uaudio.c
cvs rdiff -u -r1.131 -r1.132 src/sys/dev/usb/ugen.c src/sys/dev/usb/uhub.c
cvs rdiff -u -r1.266 -r1.267 src/sys/dev/usb/uhci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/ehci.c
diff -u src/sys/dev/usb/ehci.c:1.247 src/sys/dev/usb/ehci.c:1.248
--- src/sys/dev/usb/ehci.c:1.247	Fri Dec 11 07:21:09 2015
+++ src/sys/dev/usb/ehci.c	Sun Mar 13 07:01:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci.c,v 1.247 2015/12/11 07:21:09 skrll Exp $ */
+/*	$NetBSD: ehci.c,v 1.248 2016/03/13 07:01:43 skrll Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.247 2015/12/11 07:21:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.248 2016/03/13 07:01:43 skrll Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -2789,7 +2789,7 @@ ehci_alloc_sqh(ehci_softc_t *sc)
 #endif
 		if (err)
 			return (NULL);
-		for(i = 0; i < EHCI_SQH_CHUNK; i++) {
+		for (i = 0; i < EHCI_SQH_CHUNK; i++) {
 			offs = i * EHCI_SQH_SIZE;
 			sqh = KERNADDR(&dma, offs);
 			sqh->physaddr = DMAADDR(&dma, offs);
@@ -2835,7 +2835,7 @@ ehci_alloc_sqtd(ehci_softc_t *sc)
 		if (err)
 			goto done;
 
-		for(i = 0; i < EHCI_SQTD_CHUNK; i++) {
+		for (i = 0; i < EHCI_SQTD_CHUNK; i++) {
 			offs = i * EHCI_SQTD_SIZE;
 			sqtd = KERNADDR(&dma, offs);
 			sqtd->physaddr = DMAADDR(&dma, offs);

Index: src/sys/dev/usb/ohci.c
diff -u src/sys/dev/usb/ohci.c:1.258 src/sys/dev/usb/ohci.c:1.259
--- src/sys/dev/usb/ohci.c:1.258	Mon Nov 30 13:27:09 2015
+++ src/sys/dev/usb/ohci.c	Sun Mar 13 07:01:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ohci.c,v 1.258 2015/11/30 13:27:09 skrll Exp $	*/
+/*	$NetBSD: ohci.c,v 1.259 2016/03/13 07:01:43 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2005, 2012 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.258 2015/11/30 13:27:09 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.259 2016/03/13 07:01:43 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -423,7 +423,7 @@ ohci_alloc_std(ohci_softc_t *sc)
 			  OHCI_TD_ALIGN, &dma);
 		if (err)
 			return (NULL);
-		for(i = 0; i < OHCI_STD_CHUNK; i++) {
+		for (i = 0; i < OHCI_STD_CHUNK; i++) {
 			offs = i * OHCI_STD_SIZE;
 			std = KERNADDR(&dma, offs);
 			std->physaddr = DMAADDR(&dma, offs);
@@ -585,7 +585,7 @@ ohci_alloc_sitd(ohci_softc_t *sc)
 			  OHCI_ITD_ALIGN, &dma);
 		if (err)
 			return (NULL);
-		for(i = 0; i < OHCI_SITD_CHUNK; i++) {
+		for (i = 0; i < OHCI_SITD_CHUNK; i++) {
 			offs = i * OHCI_SITD_SIZE;
 			sitd = KERNADDR(&dma, offs);
 			sitd->physaddr = DMAADDR(&dma, offs);

Index: src/sys/dev/usb/uaudio.c
diff -u src/sys/dev/usb/uaudio.c:1.144 src/sys/dev/usb/uaudio.c:1.145
--- src/sys/dev/usb/uaudio.c:1.144	Mon Jan 26 20:56:44 2015
+++ src/sys/dev/usb/uaudio.c	Sun Mar 13 07:01:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uaudio.c,v 1.144 2015/01/26 20:56:44 gson Exp $	*/
+/*	$NetBSD: uaudio.c,v 1.145 2016/03/13 07:01:43 skrll Exp $	*/
 
 /*
  * Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.144 2015/01/26 20:56:44 gson Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.145 2016/03/13 07:01:43 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2957,7 +2957,7 @@ uaudio_chan_rintr(usbd_xfer_handle xfer,
 	 * Transfer data from channel buffer to upper layer buffer, taking
 	 * care of wrapping the upper layer buffer.
 	 */
-	for(i = 0; i < UAUDIO_NFRAMES; i++) {
+	for (i = 0; i < UAUDIO_NFRAMES; i++) {
 		frsize = cb->sizes[i];
 		n = min(frsize, ch->end - ch->cur);
 		memcpy(ch->cur, cb->buffer + cb->offsets[i], n);

Index: src/sys/dev/usb/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.131 src/sys/dev/usb/ugen.c:1.132
--- src/sys/dev/usb/ugen.c:1.131	Mon Feb 22 08:06:47 2016
+++ src/sys/dev/usb/ugen.c	Sun Mar 13 07:01:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.131 2016/02/22 08:06:47 skrll Exp $	*/
+/*	$NetBSD: ugen.c,v 1.132 2016/03/13 07:01:43 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.131 2016/02/22 08:06:47 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.132 2016/03/13 07:01:43 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -469,7 +469,7 @@ ugenopen(dev_t dev, int flag, int mode, 
 				sce->ibuf = NULL;
 				return (EIO);
 			}
-			for(i = 0; i < UGEN_NISOREQS; ++i) {
+			for (i = 0; i < UGEN_NISOREQS; ++i) {
 				sce->isoreqs[i].sce = sce;
 				xfer = usbd_alloc_xfer(sc->sc_udev);
 				if (xfer == 0)
@@ -482,7 +482,7 @@ ugenopen(dev_t dev, int flag, int mode, 
 					goto bad;
 				}
 				sce->isoreqs[i].dmabuf = tbuf;
-				for(j = 0; j < UGEN_NISORFRMS; ++j)
+				for (j = 0; j < UGEN_NISORFRMS; ++j)
 					sce->isoreqs[i].sizes[j] = isize;
 				usbd_setup_isoc_xfer
 					(xfer, sce->pipeh, &sce->isoreqs[i],
Index: src/sys/dev/usb/uhub.c
diff -u src/sys/dev/usb/uhub.c:1.131 src/sys/dev/usb/uhub.c:1.132
--- src/sys/dev/usb/uhub.c:1.131	Tue Feb 16 07:51:13 2016
+++ src/sys/dev/usb/uhub.c	Sun Mar 13 07:01:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhub.c,v 1.131 2016/02/16 07:51:13 skrll Exp $	*/
+/*	$NetBSD: uhub.c,v 1.132 2016/03/13 07:01:43 skrll Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $	*/
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.131 2016/02/16 07:51:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.132 2016/03/13 07:01:43 skrll Exp $");
 
 #include <sys/param.h>
 
@@ -654,7 +654,7 @@ uhub_detach(device_t self, int flags)
 	KERNEL_LOCK(1, curlwp);
 
 	nports = hub->hubdesc.bNbrPorts;
-	for(port = 0; port < nports; port++) {
+	for (port = 0; port < nports; port++) {
 		rup = &hub->ports[port];
 		if (rup->device == NULL)
 			continue;

Index: src/sys/dev/usb/uhci.c
diff -u src/sys/dev/usb/uhci.c:1.266 src/sys/dev/usb/uhci.c:1.267
--- src/sys/dev/usb/uhci.c:1.266	Wed Aug 19 06:23:35 2015
+++ src/sys/dev/usb/uhci.c	Sun Mar 13 07:01:43 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhci.c,v 1.266 2015/08/19 06:23:35 skrll Exp $	*/
+/*	$NetBSD: uhci.c,v 1.267 2016/03/13 07:01:43 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.266 2015/08/19 06:23:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.267 2016/03/13 07:01:43 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -489,7 +489,7 @@ uhci_init(uhci_softc_t *sc)
 	 * queue heads and the interrupt queue heads at the control
 	 * queue head and point the physical frame list to the virtual.
 	 */
-	for(i = 0; i < UHCI_VFRAMELIST_COUNT; i++) {
+	for (i = 0; i < UHCI_VFRAMELIST_COUNT; i++) {
 		std = uhci_alloc_std(sc);
 		sqh = uhci_alloc_sqh(sc);
 		if (std == NULL || sqh == NULL)
@@ -618,9 +618,9 @@ uhci_allocm(struct usbd_bus *bus, usb_dm
 		stds = kmem_alloc(sizeof(uhci_soft_td_t *) * n, KM_SLEEP);
 		if (!stds)
 			return USBD_NOMEM;
-		for(i = 0; i < n; i++)
+		for (i = 0; i < n; i++)
 			stds[i] = uhci_alloc_std(sc);
-		for(i = 0; i < n; i++)
+		for (i = 0; i < n; i++)
 			if (stds[i] != NULL)
 				uhci_free_std(sc, stds[i]);
 		kmem_free(stds, sizeof(uhci_soft_td_t *) * n);
@@ -899,7 +899,7 @@ uhci_dump_tds(uhci_soft_td_t *std)
 	uhci_soft_td_t *td;
 	int stop;
 
-	for(td = std; td != NULL; td = td->link.std) {
+	for (td = std; td != NULL; td = td->link.std) {
 		uhci_dump_td(td);
 
 		/* Check whether the link pointer in this TD marks
@@ -1783,7 +1783,7 @@ uhci_run(uhci_softc_t *sc, int run, int 
 	else
 		cmd &= ~UHCI_CMD_RS;
 	UHCICMD(sc, cmd);
-	for(n = 0; n < 10; n++) {
+	for (n = 0; n < 10; n++) {
 		running = !(UREAD2(sc, UHCI_STS) & UHCI_STS_HCH);
 		/* return when we've entered the state we want */
 		if (run == running) {
@@ -1871,7 +1871,7 @@ uhci_alloc_sqh(uhci_softc_t *sc)
 			  UHCI_QH_ALIGN, &dma);
 		if (err)
 			return (0);
-		for(i = 0; i < UHCI_SQH_CHUNK; i++) {
+		for (i = 0; i < UHCI_SQH_CHUNK; i++) {
 			offs = i * UHCI_SQH_SIZE;
 			sqh = KERNADDR(&dma, offs);
 			sqh->physaddr = DMAADDR(&dma, offs);
@@ -2478,7 +2478,7 @@ uhci_device_intr_close(usbd_pipe_handle 
 	 */
 	usb_delay_ms_locked(&sc->sc_bus, 2, &sc->sc_lock);
 
-	for(i = 0; i < npoll; i++)
+	for (i = 0; i < npoll; i++)
 		uhci_free_sqh(sc, upipe->u.intr.qhs[i]);
 	kmem_free(upipe->u.intr.qhs, npoll * sizeof(uhci_soft_qh_t *));
 
@@ -3042,7 +3042,7 @@ uhci_device_intr_done(usbd_xfer_handle x
 	KASSERT(sc->sc_bus.use_polling || mutex_owned(&sc->sc_lock));
 
 	npoll = upipe->u.intr.npoll;
-	for(i = 0; i < npoll; i++) {
+	for (i = 0; i < npoll; i++) {
 		sqh = upipe->u.intr.qhs[i];
 		sqh->elink = NULL;
 		sqh->qh.qh_elink = htole32(UHCI_PTR_T);
@@ -3277,7 +3277,7 @@ uhci_device_setintr(uhci_softc_t *sc, st
 	DPRINTFN(1, ("uhci_device_setintr: bw=%d offs=%d\n", bestbw, bestoffs));
 
 	mutex_enter(&sc->sc_lock);
-	for(i = 0; i < npoll; i++) {
+	for (i = 0; i < npoll; i++) {
 		upipe->u.intr.qhs[i] = sqh = uhci_alloc_sqh(sc);
 		sqh->elink = NULL;
 		sqh->qh.qh_elink = htole32(UHCI_PTR_T);
@@ -3290,7 +3290,7 @@ uhci_device_setintr(uhci_softc_t *sc, st
 #undef MOD
 
 	/* Enter QHs into the controller data structures. */
-	for(i = 0; i < npoll; i++)
+	for (i = 0; i < npoll; i++)
 		uhci_add_intr(sc, upipe->u.intr.qhs[i]);
 	mutex_exit(&sc->sc_lock);
 

Reply via email to