Module Name:    src
Committed By:   msaitoh
Date:           Mon Mar  2 06:38:06 UTC 2020

Modified Files:
        src/sys/dev/pci: if_gem_pci.c

Log Message:
 KNF. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/pci/if_gem_pci.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/pci/if_gem_pci.c
diff -u src/sys/dev/pci/if_gem_pci.c:1.49 src/sys/dev/pci/if_gem_pci.c:1.50
--- src/sys/dev/pci/if_gem_pci.c:1.49	Sun Mar  1 05:51:46 2020
+++ src/sys/dev/pci/if_gem_pci.c	Mon Mar  2 06:38:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_gem_pci.c,v 1.49 2020/03/01 05:51:46 thorpej Exp $ */
+/*	$NetBSD: if_gem_pci.c,v 1.50 2020/03/02 06:38:06 msaitoh Exp $ */
 
 /*
  *
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.49 2020/03/01 05:51:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gem_pci.c,v 1.50 2020/03/02 06:38:06 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -105,7 +105,7 @@ gem_pci_match(device_t parent, cfdata_t 
 	    (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_GMAC ||
 	     PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_GMAC2 ||
 	     PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_GMAC3 ||
- 	     PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_SHASTA_GMAC ||
+	     PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_SHASTA_GMAC ||
 	     PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_K2_GMAC ||
 	     PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_SHASTA_GMAC ||
 	     PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_APPLE_INTREPID2_GMAC))
@@ -219,12 +219,14 @@ gem_pci_attach(device_t parent, device_t
 	    PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
 	    &sc->sc_bustag, &sc->sc_h1, NULL, &sc->sc_size) != 0)
 	{
-		aprint_error_dev(sc->sc_dev, "unable to map device registers\n");
+		aprint_error_dev(sc->sc_dev,
+		    "unable to map device registers\n");
 		return;
 	}
 	if (bus_space_subregion(sc->sc_bustag, sc->sc_h1,
 	    GEM_PCI_BANK2_OFFSET, GEM_PCI_BANK2_SIZE, &sc->sc_h2)) {
-		aprint_error_dev(sc->sc_dev, "unable to create bank 2 subregion\n");
+		aprint_error_dev(sc->sc_dev,
+		    "unable to create bank 2 subregion\n");
 		return;
 	}
 
@@ -233,7 +235,7 @@ gem_pci_attach(device_t parent, device_t
 		memcpy(enaddr, prop_data_data_nocopy(data), ETHER_ADDR_LEN);
 		got_addr = 1;
 		if ((data = prop_dictionary_get(device_properties(sc->sc_dev),
-	    	    "shared-pins")) != NULL) {
+		    "shared-pins")) != NULL) {
 			memcpy(buf, prop_data_data_nocopy(data),
 			    prop_data_size(data));
 			if (isserdes(buf)) {
@@ -242,12 +244,12 @@ gem_pci_attach(device_t parent, device_t
 		}
 	} else {
 		/*
-		 * Dig out VPD (vital product data) and acquire Ethernet address.
-		 * The VPD of gem resides in the PCI PROM (PCI FCode).
+		 * Dig out VPD (vital product data) and acquire Ethernet
+		 * address. The VPD of gem resides in the PCI PROM (PCI FCode).
 		 */
 		/*
-		 * ``Writing FCode 3.x Programs'' (newer ones, dated 1997 and later)
-		 * chapter 2 describes the data structure.
+		 * ``Writing FCode 3.x Programs'' (newer ones, dated 1997 and
+		 * later) chapter 2 describes the data structure.
 		 */
 
 		enp = NULL;
@@ -279,8 +281,8 @@ gem_pci_attach(device_t parent, device_t
 			}
 #ifdef GEM_DEBUG
 			/* PROM dump */
-			printf("%s: PROM dump (0x0000 to %04zx)\n", device_xname(sc->sc_dev),
-			    (sizeof buf) - 1);
+			printf("%s: PROM dump (0x0000 to %04zx)\n",
+			    device_xname(sc->sc_dev), (sizeof buf) - 1);
 			i = 0;
 			j = 0;
 			printf("  %04x  ", i);
@@ -310,23 +312,24 @@ gem_pci_attach(device_t parent, device_t
 				(buf[PROMHDR_PTR_DATA + 1] << 8))) >= 0x1c) {
 
 				/* read PCI Expansion PROM Data */
-				bus_space_read_region_1(sc->sc_bustag, romh, dataoff,
-				    buf, 64);
+				bus_space_read_region_1(sc->sc_bustag, romh,
+				    dataoff, buf, 64);
 				if (memcmp(buf, promdat, sizeof promdat) == 0 &&
 				    gempromvalid(buf + PROMDATA_DATA2) &&
 				    (vpdoff = (buf[PROMDATA_PTR_VPD] |
 					(buf[PROMDATA_PTR_VPD + 1] << 8))) >= 0x1c) {
 
 					/*
-					 * The VPD of gem is not in PCI 2.2 standard
-					 * format.  The length in the resource header
-					 * is in big endian, and resources are not
-					 * properly terminated (only one resource
-					 * and no end tag).
+					 * The VPD of gem is not in PCI 2.2
+					 * standard format.  The length in the
+					 * resource header is in big endian,
+					 * and resources are not properly
+					 * terminated (only one resource and no
+					 * end tag).
 					 */
 					/* read PCI VPD */
-					bus_space_read_region_1(sc->sc_bustag, romh,
-					    vpdoff, buf, 64);
+					bus_space_read_region_1(sc->sc_bustag,
+					    romh, vpdoff, buf, 64);
 					vpd = (void *)(buf + 3);
 					if (PCI_VPDRES_ISLARGE(buf[0]) &&
 					    PCI_VPDRES_LARGE_NAME(buf[0])
@@ -349,7 +352,8 @@ gem_pci_attach(device_t parent, device_t
 		}
 	}
 	if (!got_addr) {
-		printf("%s: no Ethernet address found\n", device_xname(sc->sc_dev));
+		printf("%s: no Ethernet address found\n",
+		    device_xname(sc->sc_dev));
 		/* should we bail here? */
 	}
 
@@ -391,7 +395,8 @@ gem_pci_estintr(struct gem_pci_softc *gs
 	const char *intrstr;
 	char intrbuf[PCI_INTRSTR_LEN];
 
-	intrstr = pci_intr_string(gsc->gsc_pc, gsc->gsc_handle, intrbuf, sizeof(intrbuf));
+	intrstr = pci_intr_string(gsc->gsc_pc, gsc->gsc_handle, intrbuf,
+	    sizeof(intrbuf));
 	gsc->gsc_ih = pci_intr_establish_xname(gsc->gsc_pc, gsc->gsc_handle,
 	    IPL_NET, gem_intr, sc, device_xname(sc->sc_dev));
 	if (gsc->gsc_ih == NULL) {

Reply via email to