Module Name:    src
Committed By:   msaitoh
Date:           Tue Oct 11 11:01:17 UTC 2022

Modified Files:
        src/sys/dev/usb: xhci.c

Log Message:
KNF a bit. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 src/sys/dev/usb/xhci.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/xhci.c
diff -u src/sys/dev/usb/xhci.c:1.174 src/sys/dev/usb/xhci.c:1.175
--- src/sys/dev/usb/xhci.c:1.174	Tue Oct 11 09:30:46 2022
+++ src/sys/dev/usb/xhci.c	Tue Oct 11 11:01:17 2022
@@ -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 @@ xhci_id_protocols(struct xhci_softc *sc,
 	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 @@ xhci_init(struct xhci_softc *sc)
 	/* 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);
 	}
 
 	/*

Reply via email to