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 a bit. No functional change.



details:   https://anonhg.NetBSD.org/src/rev/5a2b3e3fc862
branches:  trunk
changeset: 371796:5a2b3e3fc862
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Oct 11 11:01:17 2022 +0000

description:
KNF a bit. No functional change.

diffstat:

 sys/dev/usb/xhci.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (49 lines):

diff -r 627b8cc63f0c -r 5a2b3e3fc862 sys/dev/usb/xhci.c
--- a/sys/dev/usb/xhci.c        Tue Oct 11 09:55:21 2022 +0000
+++ b/sys/dev/usb/xhci.c        Tue Oct 11 11:01:17 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xhci.c,v 1.174 2022/10/11 09:30:46 msaitoh Exp $       */
+/*     $NetBSD: xhci.c,v 1.175 2022/10/11 11:01:17 msaitoh Exp $       */
 
 /*
  * Copyright (c) 2013 Jonathan A. Kollasch
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.174 2022/10/11 09:30:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xhci.c,v 1.175 2022/10/11 11:01:17 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1213,11 +1213,11 @@
        case 0x0310:
        case 0x0320:
                aprint_debug_dev(sc->sc_dev, " %s ports %d - %d\n",
-                   major == 3 ? "ss" : "hs", cpo, cpo + cpc -1);
+                   major == 3 ? "ss" : "hs", cpo, cpo + cpc - 1);
                if (major == 3)
-                       sc->sc_usb3nports += cpo + cpc -1;
+                       sc->sc_usb3nports += cpo + cpc - 1;
                else
-                       sc->sc_usb2nports += cpo + cpc -1;
+                       sc->sc_usb2nports += cpo + cpc - 1;
                break;
        default:
                aprint_error_dev(sc->sc_dev, " unknown major/minor (%d/%d)\n",
@@ -1438,11 +1438,13 @@
        /* default all ports to bus 0, i.e. usb 3 */
        sc->sc_ctlrportbus = kmem_zalloc(
            howmany(sc->sc_maxports * sizeof(uint8_t), NBBY), KM_SLEEP);
-       sc->sc_ctlrportmap = kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
+       sc->sc_ctlrportmap =
+           kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
 
        /* controller port to bus roothub port map */
        for (size_t j = 0; j < __arraycount(sc->sc_rhportmap); j++) {
-               sc->sc_rhportmap[j] = kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
+               sc->sc_rhportmap[j] =
+                   kmem_zalloc(sc->sc_maxports * sizeof(int), KM_SLEEP);
        }
 
        /*



Home | Main Index | Thread Index | Old Index