Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb KNF



details:   https://anonhg.NetBSD.org/src/rev/21bc8e69607d
branches:  trunk
changeset: 344108:21bc8e69607d
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Mar 13 07:01:43 2016 +0000

description:
KNF

diffstat:

 sys/dev/usb/ehci.c   |   8 ++++----
 sys/dev/usb/ohci.c   |   8 ++++----
 sys/dev/usb/uaudio.c |   6 +++---
 sys/dev/usb/ugen.c   |   8 ++++----
 sys/dev/usb/uhci.c   |  24 ++++++++++++------------
 sys/dev/usb/uhub.c   |   6 +++---
 6 files changed, 30 insertions(+), 30 deletions(-)

diffs (264 lines):

diff -r 7ad596c2d707 -r 21bc8e69607d sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sun Mar 13 05:46:20 2016 +0000
+++ b/sys/dev/usb/ehci.c        Sun Mar 13 07:01:43 2016 +0000
@@ -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 @@
 #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 @@
                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);
diff -r 7ad596c2d707 -r 21bc8e69607d sys/dev/usb/ohci.c
--- a/sys/dev/usb/ohci.c        Sun Mar 13 05:46:20 2016 +0000
+++ b/sys/dev/usb/ohci.c        Sun Mar 13 07:01:43 2016 +0000
@@ -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_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_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);
diff -r 7ad596c2d707 -r 21bc8e69607d sys/dev/usb/uaudio.c
--- a/sys/dev/usb/uaudio.c      Sun Mar 13 05:46:20 2016 +0000
+++ b/sys/dev/usb/uaudio.c      Sun Mar 13 07:01:43 2016 +0000
@@ -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 @@
         * 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);
diff -r 7ad596c2d707 -r 21bc8e69607d sys/dev/usb/ugen.c
--- a/sys/dev/usb/ugen.c        Sun Mar 13 05:46:20 2016 +0000
+++ b/sys/dev/usb/ugen.c        Sun Mar 13 07:01:43 2016 +0000
@@ -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 @@
                                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 @@
                                        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],
diff -r 7ad596c2d707 -r 21bc8e69607d sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Sun Mar 13 05:46:20 2016 +0000
+++ b/sys/dev/usb/uhci.c        Sun Mar 13 07:01:43 2016 +0000
@@ -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 @@
         * 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 @@
                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_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 @@
        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_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 @@
         */
        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 @@
        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 @@
        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 @@
 #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);
 
diff -r 7ad596c2d707 -r 21bc8e69607d sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c        Sun Mar 13 05:46:20 2016 +0000
+++ b/sys/dev/usb/uhub.c        Sun Mar 13 07:01:43 2016 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index