Source-Changes-HG archive

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

[src/trunk]: src/sys/dev KNF. No functional change.



details:   https://anonhg.NetBSD.org/src/rev/0b02231ea7d7
branches:  trunk
changeset: 346464:0b02231ea7d7
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jul 14 04:19:26 2016 +0000

description:
KNF. No functional change.

diffstat:

 sys/dev/acpi/vald_acpi.c         |   22 ++++---
 sys/dev/acpi/wss_acpi.c          |    7 +-
 sys/dev/cardbus/fwohci_cardbus.c |   10 +--
 sys/dev/ic/adv.c                 |   49 ++++++++--------
 sys/dev/ic/adw.c                 |  113 ++++++++++++++++++++------------------
 sys/dev/ic/aha.c                 |   10 +--
 sys/dev/ic/bha.c                 |   53 +++++++++--------
 sys/dev/isa/bha_isa.c            |    7 +-
 sys/dev/isa/if_ix.c              |   44 ++++++++------
 sys/dev/isa/ioat66.c             |    7 +-
 sys/dev/isa/pcdisplay.c          |   20 +++---
 sys/dev/mca/if_tr_mca.c          |    7 +-
 sys/dev/pci/amr.c                |   22 +++---
 sys/dev/pci/hdaudio_pci.c        |   10 ++-
 sys/dev/pci/ixpide.c             |   12 ++-
 sys/dev/pci/jmide.c              |   11 ++-
 sys/dev/pci/mpt_pci.c            |    9 +-
 sys/dev/pci/siisata_pci.c        |   15 ++--
 sys/dev/pci/twe.c                |   86 +++++++++++++++++------------
 sys/dev/pci/yds.c                |    7 +-
 sys/dev/pcmcia/if_awi_pcmcia.c   |   13 +--
 sys/dev/usb/ubt.c                |   22 ++++---
 sys/dev/usb/uyap.c               |   21 +++---
 23 files changed, 304 insertions(+), 273 deletions(-)

diffs (truncated from 1744 to 300 lines):

diff -r d23ecc353c88 -r 0b02231ea7d7 sys/dev/acpi/vald_acpi.c
--- a/sys/dev/acpi/vald_acpi.c  Thu Jul 14 04:15:27 2016 +0000
+++ b/sys/dev/acpi/vald_acpi.c  Thu Jul 14 04:19:26 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vald_acpi.c,v 1.4 2010/04/15 07:02:24 jruoho Exp $ */
+/*     $NetBSD: vald_acpi.c,v 1.5 2016/07/14 04:19:26 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vald_acpi.c,v 1.4 2010/04/15 07:02:24 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vald_acpi.c,v 1.5 2016/07/14 04:19:26 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -206,8 +206,8 @@
        rv = vald_acpi_ghci_get(sc, GHCI_BACKLIGHT, &value, &result);
        if (ACPI_SUCCESS(rv)) {
                if (result != 0)
-                       aprint_error_dev(self, "can't get backlight status error=%d\n",
-                           result);
+                       aprint_error_dev(self,
+                           "can't get backlight status error=%d\n", result);
                else
                        aprint_verbose_dev(self, "LCD backlight %s\n",
                            ((value == GHCI_ON) ? "on" : "off"));
@@ -217,8 +217,8 @@
        rv = vald_acpi_ghci_set(sc, GHCI_SYSTEM_EVENT_FIFO, GHCI_ENABLE,
            &result);
        if (ACPI_SUCCESS(rv) && result != 0)
-               aprint_error_dev(self, "can't enable SystemEventFIFO error=%d\n",
-                   result);
+               aprint_error_dev(self,
+                   "can't enable SystemEventFIFO error=%d\n", result);
 
        rv = vald_acpi_ghci_set(sc, GHCI_HOTKEY_EVENT, GHCI_ENABLE, &result);
        if (ACPI_SUCCESS(rv) && result != 0)
@@ -558,7 +558,8 @@
                rv = vald_acpi_ghci_set(sc, GHCI_BACKLIGHT, backlight_new,
                    &result);
                if (ACPI_SUCCESS(rv) && result != 0)
-                       aprint_error_dev(sc->sc_dev, "can't set LCD backlight %s error=%x\n",
+                       aprint_error_dev(sc->sc_dev,
+                           "can't set LCD backlight %s error=%x\n",
                            ((backlight_new == 1) ? "on" : "off"), result);
        }
 
@@ -569,7 +570,8 @@
 
                rv = vald_acpi_bcm_set(sc->lcd_handle, bright);
                if (ACPI_FAILURE(rv))
-                       aprint_error_dev(sc->sc_dev, "unable to evaluate _BCM: %s\n",
+                       aprint_error_dev(sc->sc_dev,
+                           "unable to evaluate _BCM: %s\n",
                            AcpiFormatException(rv));
        } else {
                bright = 0;
@@ -598,8 +600,8 @@
        if (ACPI_FAILURE(rv))
                return;
        if (result != 0) {
-               aprint_error_dev(sc->sc_dev, "can't get video status  error=%x\n",
-                   result);
+               aprint_error_dev(sc->sc_dev,
+                   "can't get video status  error=%x\n", result);
                return;
        }
 
diff -r d23ecc353c88 -r 0b02231ea7d7 sys/dev/acpi/wss_acpi.c
--- a/sys/dev/acpi/wss_acpi.c   Thu Jul 14 04:15:27 2016 +0000
+++ b/sys/dev/acpi/wss_acpi.c   Thu Jul 14 04:19:26 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wss_acpi.c,v 1.30 2016/01/15 15:42:57 joerg Exp $ */
+/* $NetBSD: wss_acpi.c,v 1.31 2016/07/14 04:19:26 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2002 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.30 2016/01/15 15:42:57 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.31 2016/07/14 04:19:26 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/audioio.h>
@@ -132,7 +132,8 @@
        dspio = acpi_res_io(&res, wah->io_region_idx_ad1848);
        oplio = acpi_res_io(&res, wah->io_region_idx_opl);
        if (dspio == NULL || oplio == NULL) {
-               aprint_error_dev(self, "unable to find i/o registers resource\n");
+               aprint_error_dev(self,
+                   "unable to find i/o registers resource\n");
                goto out;
        }
        if (bus_space_map(sc->sc_iot, dspio->ar_base, dspio->ar_length,
diff -r d23ecc353c88 -r 0b02231ea7d7 sys/dev/cardbus/fwohci_cardbus.c
--- a/sys/dev/cardbus/fwohci_cardbus.c  Thu Jul 14 04:15:27 2016 +0000
+++ b/sys/dev/cardbus/fwohci_cardbus.c  Thu Jul 14 04:19:26 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fwohci_cardbus.c,v 1.35 2012/08/04 03:55:43 riastradh Exp $    */
+/*     $NetBSD: fwohci_cardbus.c,v 1.36 2016/07/14 04:19:26 msaitoh Exp $      */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fwohci_cardbus.c,v 1.35 2012/08/04 03:55:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwohci_cardbus.c,v 1.36 2016/07/14 04:19:26 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -101,10 +101,8 @@
        fwohci_init(&sc->sc_sc);
 
        /* Map I/O registers */
-       if (Cardbus_mapreg_map(ct, PCI_OHCI_MAP_REGISTER,
-             PCI_MAPREG_TYPE_MEM, 0,
-             &sc->sc_sc.bst, &sc->sc_sc.bsh,
-             NULL, &sc->sc_sc.bssize)) {
+       if (Cardbus_mapreg_map(ct, PCI_OHCI_MAP_REGISTER, PCI_MAPREG_TYPE_MEM,
+           0, &sc->sc_sc.bst, &sc->sc_sc.bsh, NULL, &sc->sc_sc.bssize)) {
                aprint_error_dev(self, "can't map OHCI register space\n");
                return;
        }
diff -r d23ecc353c88 -r 0b02231ea7d7 sys/dev/ic/adv.c
--- a/sys/dev/ic/adv.c  Thu Jul 14 04:15:27 2016 +0000
+++ b/sys/dev/ic/adv.c  Thu Jul 14 04:19:26 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adv.c,v 1.46 2012/10/27 17:18:18 chs Exp $     */
+/*     $NetBSD: adv.c,v 1.47 2016/07/14 04:19:26 msaitoh Exp $ */
 
 /*
  * Generic driver for the Advanced Systems Inc. Narrow SCSI controllers
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.46 2012/10/27 17:18:18 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adv.c,v 1.47 2016/07/14 04:19:26 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -113,16 +113,16 @@
        if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(struct adv_control),
                           PAGE_SIZE, 0, &sc->sc_control_seg, 1,
                           &sc->sc_control_nsegs, BUS_DMA_NOWAIT)) != 0) {
-               aprint_error_dev(sc->sc_dev, "unable to allocate control structures,"
-                      " error = %d\n", error);
+               aprint_error_dev(sc->sc_dev, "unable to allocate control "
+                   "structures, error = %d\n", error);
                return (error);
        }
        if ((error = bus_dmamem_map(sc->sc_dmat, &sc->sc_control_seg,
                           sc->sc_control_nsegs, sizeof(struct adv_control),
                           (void **) & sc->sc_control,
                           BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) {
-               aprint_error_dev(sc->sc_dev, "unable to map control structures, error = %d\n",
-                      error);
+               aprint_error_dev(sc->sc_dev,
+                   "unable to map control structures, error = %d\n", error);
                return (error);
        }
        /*
@@ -131,15 +131,15 @@
        if ((error = bus_dmamap_create(sc->sc_dmat, sizeof(struct adv_control),
                           1, sizeof(struct adv_control), 0, BUS_DMA_NOWAIT,
                                       &sc->sc_dmamap_control)) != 0) {
-               aprint_error_dev(sc->sc_dev, "unable to create control DMA map, error = %d\n",
-                      error);
+               aprint_error_dev(sc->sc_dev,
+                   "unable to create control DMA map, error = %d\n", error);
                return (error);
        }
        if ((error = bus_dmamap_load(sc->sc_dmat, sc->sc_dmamap_control,
                           sc->sc_control, sizeof(struct adv_control), NULL,
                                     BUS_DMA_NOWAIT)) != 0) {
-               aprint_error_dev(sc->sc_dev, "unable to load control DMA map, error = %d\n",
-                      error);
+               aprint_error_dev(sc->sc_dev,
+                   "unable to load control DMA map, error = %d\n", error);
                return (error);
        }
 
@@ -180,8 +180,8 @@
        for (i = 0; i < count; i++) {
                ccb = &ccbstore[i];
                if ((error = adv_init_ccb(sc, ccb)) != 0) {
-                       aprint_error_dev(sc->sc_dev, "unable to initialize ccb, error = %d\n",
-                              error);
+                       aprint_error_dev(sc->sc_dev,
+                           "unable to initialize ccb, error = %d\n", error);
                        return (i);
                }
                TAILQ_INSERT_TAIL(&sc->sc_free_ccb, ccb, chain);
@@ -229,8 +229,8 @@
                         ASC_MAX_SG_LIST, (ASC_MAX_SG_LIST - 1) * PAGE_SIZE,
                   0, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW, &ccb->dmamap_xfer);
        if (error) {
-               aprint_error_dev(sc->sc_dev, "unable to create DMA map, error = %d\n",
-                      error);
+               aprint_error_dev(sc->sc_dev,
+                   "unable to create DMA map, error = %d\n", error);
                return (error);
        }
 
@@ -482,10 +482,11 @@
         */
        i = adv_create_ccbs(sc, sc->sc_control->ccbs, ADV_MAX_CCB);
        if (i == 0) {
-               aprint_error_dev(sc->sc_dev, "unable to create control blocks\n");
+               aprint_error_dev(sc->sc_dev,
+                   "unable to create control blocks\n");
                return; /* (ENOMEM) */ ;
        } else if (i != ADV_MAX_CCB) {
-               aprint_error_dev(sc->sc_dev, 
+               aprint_error_dev(sc->sc_dev,
                    "WARNING: only %d of %d control blocks created\n",
                    i, ADV_MAX_CCB);
        }
@@ -525,7 +526,8 @@
  */
 
 static void
-adv_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg)
+adv_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req,
+    void *arg)
 {
        struct scsipi_xfer *xs;
        struct scsipi_periph *periph;
@@ -634,13 +636,14 @@
                        default:
                                xs->error = XS_DRIVER_STUFFUP;
                                if (error == EFBIG) {
-                                       aprint_error_dev(sc->sc_dev, "adv_scsi_cmd, more than %d"
+                                       aprint_error_dev(sc->sc_dev,
+                                           "adv_scsi_cmd, more than %d"
                                            " DMA segments\n",
                                            ASC_MAX_SG_LIST);
                                } else {
-                                       aprint_error_dev(sc->sc_dev, "adv_scsi_cmd, error %d"
-                                           " loading DMA map\n",
-                                           error);
+                                       aprint_error_dev(sc->sc_dev,
+                                           "adv_scsi_cmd, error %d"
+                                           " loading DMA map\n", error);
                                }
 
 out_bad:
@@ -745,8 +748,7 @@
 #ifdef ASC_DEBUG
        int int_pend = FALSE;
 
-       if(ASC_IS_INT_PENDING(sc->sc_iot, sc->sc_ioh))
-       {
+       if (ASC_IS_INT_PENDING(sc->sc_iot, sc->sc_ioh)) {
                int_pend = TRUE;
                printf("ISR - ");
        }
@@ -949,7 +951,6 @@
                break;
        }
 
-
        adv_free_ccb(sc, ccb);
        scsipi_done(xs);
 }
diff -r d23ecc353c88 -r 0b02231ea7d7 sys/dev/ic/adw.c
--- a/sys/dev/ic/adw.c  Thu Jul 14 04:15:27 2016 +0000
+++ b/sys/dev/ic/adw.c  Thu Jul 14 04:19:26 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adw.c,v 1.53 2016/07/07 06:55:41 msaitoh Exp $      */
+/* $NetBSD: adw.c,v 1.54 2016/07/14 04:19:26 msaitoh Exp $      */
 
 /*
  * Generic driver for the Advanced Systems Inc. SCSI controllers
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: adw.c,v 1.53 2016/07/07 06:55:41 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adw.c,v 1.54 2016/07/14 04:19:26 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -108,17 +108,16 @@
          * Allocate the control structure.
          */
        if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(struct adw_control),
-                          PAGE_SIZE, 0, &seg, 1, &rseg,
-                          BUS_DMA_NOWAIT)) != 0) {
-               aprint_error_dev(sc->sc_dev, "unable to allocate control structures,"
-                      " error = %d\n", error);
+           PAGE_SIZE, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
+               aprint_error_dev(sc->sc_dev, "unable to allocate control "



Home | Main Index | Thread Index | Old Index