diff --git a/sys/dev/acpi/vald_acpi.c b/sys/dev/acpi/vald_acpi.c index 424ddf0da07e..77d01b363344 100644 --- a/sys/dev/acpi/vald_acpi.c +++ b/sys/dev/acpi/vald_acpi.c @@ -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 -__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 #include @@ -206,8 +206,8 @@ vald_acpi_attach(device_t parent, device_t self, void *aux) 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 @@ vald_acpi_attach(device_t parent, device_t self, void *aux) 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 @@ vald_acpi_libright_set(struct vald_acpi_softc *sc, int UpDown) 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 @@ vald_acpi_libright_set(struct vald_acpi_softc *sc, int UpDown) 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 @@ vald_acpi_video_switch(struct vald_acpi_softc *sc) 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 --git a/sys/dev/acpi/wss_acpi.c b/sys/dev/acpi/wss_acpi.c index a37107b05217..eba662a53b3c 100644 --- a/sys/dev/acpi/wss_acpi.c +++ b/sys/dev/acpi/wss_acpi.c @@ -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 @@ -26,7 +26,7 @@ */ #include -__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 #include @@ -132,7 +132,8 @@ wss_acpi_attach(device_t parent, device_t self, void *aux) 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 --git a/sys/dev/cardbus/fwohci_cardbus.c b/sys/dev/cardbus/fwohci_cardbus.c index 7c1aaff336c9..0810aed80332 100644 --- a/sys/dev/cardbus/fwohci_cardbus.c +++ b/sys/dev/cardbus/fwohci_cardbus.c @@ -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 -__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 #include @@ -101,10 +101,8 @@ fwohci_cardbus_attach(device_t parent, device_t self, void *aux) 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 --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c index a9b96ebd3bb5..21789d312e35 100644 --- a/sys/dev/ic/adv.c +++ b/sys/dev/ic/adv.c @@ -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 -__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 #include @@ -113,16 +113,16 @@ adv_alloc_control_data(ASC_SOFTC *sc) 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 @@ adv_alloc_control_data(ASC_SOFTC *sc) 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 @@ adv_create_ccbs(ASC_SOFTC *sc, ADV_CCB *ccbstore, int count) 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 @@ adv_init_ccb(ASC_SOFTC *sc, ADV_CCB *ccb) 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 @@ adv_attach(ASC_SOFTC *sc) */ 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 @@ advminphys(struct buf *bp) */ 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 @@ adv_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req, void * 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 @@ adv_intr(void *arg) #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 @@ adv_narrow_isr_callback(ASC_SOFTC *sc, ASC_QDONE_INFO *qdonep) break; } - adv_free_ccb(sc, ccb); scsipi_done(xs); } diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c index c529d140f842..6115b207b692 100644 --- a/sys/dev/ic/adw.c +++ b/sys/dev/ic/adw.c @@ -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 -__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 #include @@ -108,17 +108,16 @@ adw_alloc_controls(ADW_SOFTC *sc) * 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 " + "structures, error = %d\n", error); return (error); } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(struct adw_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); + sizeof(struct adw_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); return (error); } @@ -126,17 +125,17 @@ adw_alloc_controls(ADW_SOFTC *sc) * Create and load the DMA map used for the control blocks. */ if ((error = bus_dmamap_create(sc->sc_dmat, sizeof(struct adw_control), - 1, sizeof(struct adw_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); + 1, sizeof(struct adw_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); return (error); } if ((error = bus_dmamap_load(sc->sc_dmat, sc->sc_dmamap_control, - sc->sc_control, sizeof(struct adw_control), NULL, - BUS_DMA_NOWAIT)) != 0) { - aprint_error_dev(sc->sc_dev, "unable to load control DMA map, error = %d\n", - error); + sc->sc_control, sizeof(struct adw_control), NULL, + BUS_DMA_NOWAIT)) != 0) { + aprint_error_dev(sc->sc_dev, + "unable to load control DMA map, error = %d\n", error); return (error); } @@ -162,18 +161,18 @@ adw_alloc_carriers(ADW_SOFTC *sc) } if ((error = bus_dmamem_alloc(sc->sc_dmat, - sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, - 0x10, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) { - aprint_error_dev(sc->sc_dev, "unable to allocate carrier structures," - " error = %d\n", error); + sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, + 0x10, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) { + aprint_error_dev(sc->sc_dev, "unable to allocate carrier " + "structures, error = %d\n", error); return (error); } if ((error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, - sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, - (void **) &sc->sc_control->carriers, - BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { - aprint_error_dev(sc->sc_dev, "unable to map carrier structures," - " error = %d\n", error); + sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, + (void **)&sc->sc_control->carriers, + BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { + aprint_error_dev(sc->sc_dev, + "unable to map carrier structures, error = %d\n", error); return (error); } @@ -181,19 +180,18 @@ adw_alloc_carriers(ADW_SOFTC *sc) * Create and load the DMA map used for the control blocks. */ if ((error = bus_dmamap_create(sc->sc_dmat, - sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, 1, - sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, 0,BUS_DMA_NOWAIT, - &sc->sc_dmamap_carrier)) != 0) { - aprint_error_dev(sc->sc_dev, "unable to create carriers DMA map," - " error = %d\n", error); + sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, 1, + sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, 0,BUS_DMA_NOWAIT, + &sc->sc_dmamap_carrier)) != 0) { + aprint_error_dev(sc->sc_dev, + "unable to create carriers DMA map, error = %d\n", error); return (error); } - if ((error = bus_dmamap_load(sc->sc_dmat, - sc->sc_dmamap_carrier, sc->sc_control->carriers, - sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, NULL, - BUS_DMA_NOWAIT)) != 0) { - aprint_error_dev(sc->sc_dev, "unable to load carriers DMA map," - " error = %d\n", error); + if ((error = bus_dmamap_load(sc->sc_dmat, sc->sc_dmamap_carrier, + sc->sc_control->carriers, sizeof(ADW_CARRIER) * ADW_MAX_CARRIER, + NULL, BUS_DMA_NOWAIT)) != 0) { + aprint_error_dev(sc->sc_dev, + "unable to load carriers DMA map, error = %d\n", error); return (error); } @@ -219,8 +217,8 @@ adw_create_ccbs(ADW_SOFTC *sc, ADW_CCB *ccbstore, int count) for (i = 0; i < count; i++) { ccb = &ccbstore[i]; if ((error = adw_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); @@ -264,12 +262,12 @@ adw_init_ccb(ADW_SOFTC *sc, ADW_CCB *ccb) * Create the DMA map for this CCB. */ error = bus_dmamap_create(sc->sc_dmat, - (ADW_MAX_SG_LIST - 1) * PAGE_SIZE, - ADW_MAX_SG_LIST, (ADW_MAX_SG_LIST - 1) * PAGE_SIZE, - 0, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW, &ccb->dmamap_xfer); + (ADW_MAX_SG_LIST - 1) * PAGE_SIZE, ADW_MAX_SG_LIST, + (ADW_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 CCB DMA map, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to create CCB DMA map, error = %d\n", error); return (error); } @@ -394,10 +392,10 @@ adw_init(ADW_SOFTC *sc) if (warn_code & ADW_WARN_EEPROM_CHKSUM) aprint_error_dev(sc->sc_dev, "Bad checksum found. " - "Setting default values\n"); + "Setting default values\n"); if (warn_code & ADW_WARN_EEPROM_TERMINATION) - aprint_error_dev(sc->sc_dev, "Bad bus termination setting." - "Using automatic termination.\n"); + aprint_error_dev(sc->sc_dev, "Bad bus termination " + "setting. Using automatic termination.\n"); } sc->isr_callback = (ADW_CALLBACK) adw_isr_callback; @@ -700,8 +698,8 @@ adw_build_req(ADW_SOFTC *sc, ADW_CCB *ccb) default: xs->error = XS_DRIVER_STUFFUP; - aprint_error_dev(sc->sc_dev, "error %d loading DMA map\n", - error); + aprint_error_dev(sc->sc_dev, + "error %d loading DMA map\n", error); out_bad: adw_free_ccb(sc, ccb); scsipi_done(xs); @@ -1104,7 +1102,8 @@ adw_isr_callback(ADW_SOFTC *sc, ADW_SCSI_REQ_Q *scsiq) case QHSTA_M_SXFR_OFF_UFLW: case QHSTA_M_SXFR_OFF_OFLW: case QHSTA_M_DATA_OVER_RUN: - aprint_error_dev(sc->sc_dev, "Overrun/Overflow/Underflow condition\n"); + aprint_error_dev(sc->sc_dev, + "Overrun/Overflow/Underflow condition\n"); xs->error = XS_DRIVER_STUFFUP; break; @@ -1139,7 +1138,8 @@ adw_isr_callback(ADW_SOFTC *sc, ADW_SCSI_REQ_Q *scsiq) * Lets try resetting the bus and reinitialize * the host adapter. */ - aprint_error_dev(sc->sc_dev, "DMA Error. Reseting bus\n"); + aprint_error_dev(sc->sc_dev, + "DMA Error. Reseting bus\n"); TAILQ_REMOVE(&sc->sc_pending_ccb, ccb, chain); adw_reset_bus(sc); xs->error = XS_BUSY; @@ -1182,7 +1182,8 @@ adw_isr_callback(ADW_SOFTC *sc, ADW_SCSI_REQ_Q *scsiq) * User didn't request sense, but we got a * check condition. */ - aprint_error_dev(sc->sc_dev, "Unexpected Check Condition\n"); + aprint_error_dev(sc->sc_dev, + "Unexpected Check Condition\n"); xs->error = XS_DRIVER_STUFFUP; break; @@ -1212,7 +1213,8 @@ adw_async_callback(ADW_SOFTC *sc, u_int8_t code) switch (code) { case ADV_ASYNC_SCSI_BUS_RESET_DET: /* The firmware detected a SCSI Bus reset. */ - printf("%s: SCSI Bus reset detected\n", device_xname(sc->sc_dev)); + printf("%s: SCSI Bus reset detected\n", + device_xname(sc->sc_dev)); break; case ADV_ASYNC_RDMA_FAILURE: @@ -1233,7 +1235,8 @@ adw_async_callback(ADW_SOFTC *sc, u_int8_t code) case ADV_ASYNC_CARRIER_READY_FAILURE: /* Carrier Ready failure. */ - printf("%s: Carrier Ready failure!\n", device_xname(sc->sc_dev)); + printf("%s: Carrier Ready failure!\n", + device_xname(sc->sc_dev)); break; default: diff --git a/sys/dev/ic/aha.c b/sys/dev/ic/aha.c index c43b84a03566..eac106659bde 100644 --- a/sys/dev/ic/aha.c +++ b/sys/dev/ic/aha.c @@ -1,4 +1,4 @@ -/* $NetBSD: aha.c,v 1.62 2016/07/11 11:31:50 msaitoh Exp $ */ +/* $NetBSD: aha.c,v 1.63 2016/07/14 04:19:27 msaitoh Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: aha.c,v 1.62 2016/07/11 11:31:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: aha.c,v 1.63 2016/07/14 04:19:27 msaitoh Exp $"); #include "opt_ddb.h" @@ -965,16 +965,14 @@ aha_init(struct aha_softc *sc) 1, sizeof(struct aha_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); + "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 aha_control), NULL, BUS_DMA_NOWAIT)) != 0) { aprint_error_dev(sc->sc_dev, - "unable to load control DMA map, error = %d\n", - error); + "unable to load control DMA map, error = %d\n", error); return (error); } diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c index 4e3f05abafc3..d3a518966405 100644 --- a/sys/dev/ic/bha.c +++ b/sys/dev/ic/bha.c @@ -1,4 +1,4 @@ -/* $NetBSD: bha.c,v 1.75 2012/10/27 17:18:19 chs Exp $ */ +/* $NetBSD: bha.c,v 1.76 2016/07/14 04:19:27 msaitoh Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.75 2012/10/27 17:18:19 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.76 2016/07/14 04:19:27 msaitoh Exp $"); #include "opt_ddb.h" @@ -354,7 +354,8 @@ bha_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req, default: xs->error = XS_DRIVER_STUFFUP; - aprint_error_dev(sc->sc_dev, "error %d loading DMA map\n", error); + aprint_error_dev(sc->sc_dev, + "error %d loading DMA map\n", error); out_bad: bha_free_ccb(sc, ccb); scsipi_done(xs); @@ -546,9 +547,10 @@ bha_get_xfer_mode(struct bha_softc *sc, struct scsipi_xfer_mode *xm) sizeof(hwperiod.reply_w) : 0); hwperiod.cmd.opcode = BHA_INQUIRE_PERIOD; hwperiod.cmd.len = rlen; - bha_cmd(sc->sc_iot, sc->sc_ioh, device_xname(sc->sc_dev), - sizeof(hwperiod.cmd), (u_char *)&hwperiod.cmd, - rlen, (u_char *)&hwperiod.reply); + bha_cmd(sc->sc_iot, sc->sc_ioh, + device_xname(sc->sc_dev), sizeof(hwperiod.cmd), + (u_char *)&hwperiod.cmd, rlen, + (u_char *)&hwperiod.reply); if (xm->xm_target > 7) period = hwperiod.reply_w.period[toff]; @@ -741,8 +743,8 @@ bha_timeout(void *arg) * Send a command to the Buglogic controller. */ static int -bha_cmd(bus_space_tag_t iot, bus_space_handle_t ioh, const char *name, int icnt, - u_char *ibuf, int ocnt, u_char *obuf) +bha_cmd(bus_space_tag_t iot, bus_space_handle_t ioh, const char *name, + int icnt, u_char *ibuf, int ocnt, u_char *obuf) { int i; int wait; @@ -1628,16 +1630,16 @@ bha_create_mailbox(struct bha_softc *sc) error = bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0, &seg, 1, &rseg, sc->sc_dmaflags); if (error) { - aprint_error_dev(sc->sc_dev, "unable to allocate mailboxes, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to allocate mailboxes, error = %d\n", error); goto bad_0; } error = bus_dmamem_map(sc->sc_dmat, &seg, rseg, size, (void **)&sc->sc_mbo, sc->sc_dmaflags | BUS_DMA_COHERENT); if (error) { - aprint_error_dev(sc->sc_dev, "unable to map mailboxes, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to map mailboxes, error = %d\n", error); goto bad_1; } @@ -1647,16 +1649,15 @@ bha_create_mailbox(struct bha_softc *sc) sc->sc_dmaflags, &sc->sc_dmamap_mbox); if (error) { aprint_error_dev(sc->sc_dev, - "unable to create mailbox DMA map, error = %d\n", - error); + "unable to create mailbox DMA map, error = %d\n", error); goto bad_2; } error = bus_dmamap_load(sc->sc_dmat, sc->sc_dmamap_mbox, sc->sc_mbo, size, NULL, 0); if (error) { - aprint_error_dev(sc->sc_dev, "unable to load mailbox DMA map, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to load mailbox DMA map, error = %d\n", error); goto bad_3; } @@ -1765,8 +1766,8 @@ bha_create_ccbs(struct bha_softc *sc, int count) error = bus_dmamem_alloc(sc->sc_dmat, PAGE_SIZE, PAGE_SIZE, 0, &seg, 1, &rseg, sc->sc_dmaflags | BUS_DMA_NOWAIT); if (error) { - aprint_error_dev(sc->sc_dev, "unable to allocate CCB group, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to allocate CCB group, error = %d\n", error); goto bad_0; } @@ -1774,8 +1775,8 @@ bha_create_ccbs(struct bha_softc *sc, int count) (void *)&bcg, sc->sc_dmaflags | BUS_DMA_NOWAIT | BUS_DMA_COHERENT); if (error) { - aprint_error_dev(sc->sc_dev, "unable to map CCB group, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to map CCB group, error = %d\n", error); goto bad_1; } @@ -1784,16 +1785,16 @@ bha_create_ccbs(struct bha_softc *sc, int count) error = bus_dmamap_create(sc->sc_dmat, PAGE_SIZE, 1, PAGE_SIZE, 0, sc->sc_dmaflags | BUS_DMA_NOWAIT, &ccbmap); if (error) { - aprint_error_dev(sc->sc_dev, "unable to create CCB group DMA map, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to create CCB group DMA map, error = %d\n", error); goto bad_2; } error = bus_dmamap_load(sc->sc_dmat, ccbmap, bcg, PAGE_SIZE, NULL, sc->sc_dmaflags | BUS_DMA_NOWAIT); if (error) { - aprint_error_dev(sc->sc_dev, "unable to load CCB group DMA map, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to load CCB group DMA map, error = %d\n", error); goto bad_3; } @@ -1869,8 +1870,8 @@ bha_init_ccb(struct bha_softc *sc, struct bha_ccb *ccb) BHA_MAXXFER, 0, BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW | sc->sc_dmaflags, &ccb->dmamap_xfer); if (error) { - aprint_error_dev(sc->sc_dev, "unable to create CCB DMA map, error = %d\n", - error); + aprint_error_dev(sc->sc_dev, + "unable to create CCB DMA map, error = %d\n", error); return (error); } diff --git a/sys/dev/isa/bha_isa.c b/sys/dev/isa/bha_isa.c index f88b90c82282..70060e7730f7 100644 --- a/sys/dev/isa/bha_isa.c +++ b/sys/dev/isa/bha_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: bha_isa.c,v 1.36 2014/10/18 08:33:28 snj Exp $ */ +/* $NetBSD: bha_isa.c,v 1.37 2016/07/14 04:19:27 msaitoh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bha_isa.c,v 1.36 2014/10/18 08:33:28 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bha_isa.c,v 1.37 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -146,7 +146,8 @@ bha_isa_attach(device_t parent, device_t self, void *aux) sc->sc_dmaflags = 0; if (bpd.sc_drq != -1) { if ((error = isa_dmacascade(ic, bpd.sc_drq)) != 0) { - aprint_error_dev(sc->sc_dev, " unable to cascade DRQ, error = %d\n", error); + aprint_error_dev(sc->sc_dev, + " unable to cascade DRQ, error = %d\n", error); return; } } else { diff --git a/sys/dev/isa/if_ix.c b/sys/dev/isa/if_ix.c index b64368b9bc77..70a7a0c89db4 100644 --- a/sys/dev/isa/if_ix.c +++ b/sys/dev/isa/if_ix.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ix.c,v 1.34 2011/06/03 16:28:40 tsutsui Exp $ */ +/* $NetBSD: if_ix.c,v 1.35 2016/07/14 04:19:27 msaitoh Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ix.c,v 1.34 2011/06/03 16:28:40 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ix.c,v 1.35 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -98,7 +98,8 @@ static void ix_zeromem (struct ie_softc *, int, int); static void ix_mediastatus(struct ie_softc *, struct ifmediareq *); static u_int16_t ix_read_eeprom(bus_space_tag_t, bus_space_handle_t, int); -static void ix_eeprom_outbits(bus_space_tag_t, bus_space_handle_t, int, int); +static void ix_eeprom_outbits(bus_space_tag_t, bus_space_handle_t, int, + int); static int ix_eeprom_inbits (bus_space_tag_t, bus_space_handle_t); static void ix_eeprom_clock (bus_space_tag_t, bus_space_handle_t, int); @@ -156,7 +157,8 @@ ix_read_eeprom(bus_space_tag_t iot, bus_space_handle_t ioh, int location) } static void -ix_eeprom_outbits(bus_space_tag_t iot, bus_space_handle_t ioh, int edata, int count) +ix_eeprom_outbits(bus_space_tag_t iot, bus_space_handle_t ioh, int edata, + int count) { int ectrl, i; @@ -234,7 +236,7 @@ ix_intrhook(struct ie_softc *sc, int where) static void -ix_copyin (struct ie_softc *sc, void *dst, int offset, size_t size) +ix_copyin(struct ie_softc *sc, void *dst, int offset, size_t size) { int i, dribble; u_int8_t* bptr = dst; @@ -249,7 +251,7 @@ ix_copyin (struct ie_softc *sc, void *dst, int offset, size_t size) bus_space_barrier(sc->bt, sc->bh, IX_READPTR, 2, BUS_SPACE_BARRIER_WRITE); } else { - bus_space_barrier(sc->bt, sc->bh, offset, size, + bus_space_barrier(sc->bt, sc->bh, offset, size, BUS_SPACE_BARRIER_READ); } @@ -257,7 +259,7 @@ ix_copyin (struct ie_softc *sc, void *dst, int offset, size_t size) if (isc->use_pio) *bptr = bus_space_read_1(sc->bt, sc->bh, IX_DATAPORT); else - *bptr = bus_space_read_1(sc->bt, sc->bh, offset); + *bptr = bus_space_read_1(sc->bt, sc->bh, offset); offset++; bptr++; size--; } @@ -281,12 +283,12 @@ ix_copyin (struct ie_softc *sc, void *dst, int offset, size_t size) if (isc->use_pio) *bptr = bus_space_read_1(sc->bt, sc->bh, IX_DATAPORT); else - *bptr = bus_space_read_1(sc->bt, sc->bh, offset); + *bptr = bus_space_read_1(sc->bt, sc->bh, offset); } } static void -ix_copyout (struct ie_softc *sc, const void *src, int offset, size_t size) +ix_copyout(struct ie_softc *sc, const void *src, int offset, size_t size) { int i, dribble; int osize = size; @@ -306,7 +308,7 @@ ix_copyout (struct ie_softc *sc, const void *src, int offset, size_t size) if (isc->use_pio) bus_space_write_1(sc->bt, sc->bh, IX_DATAPORT, *bptr); else - bus_space_write_1(sc->bt, sc->bh, offset, *bptr); + bus_space_write_1(sc->bt, sc->bh, offset, *bptr); offset++; bptr++; size--; } @@ -330,14 +332,14 @@ ix_copyout (struct ie_softc *sc, const void *src, int offset, size_t size) if (isc->use_pio) bus_space_write_1(sc->bt, sc->bh, IX_DATAPORT, *bptr); else - bus_space_write_1(sc->bt, sc->bh, offset, *bptr); + bus_space_write_1(sc->bt, sc->bh, offset, *bptr); } if (isc->use_pio) bus_space_barrier(sc->bt, sc->bh, IX_DATAPORT, 2, BUS_SPACE_BARRIER_WRITE); else - bus_space_barrier(sc->bt, sc->bh, ooffset, osize, + bus_space_barrier(sc->bt, sc->bh, ooffset, osize, BUS_SPACE_BARRIER_WRITE); } @@ -389,7 +391,7 @@ ix_write_16 (struct ie_softc *sc, int offset, u_int16_t value) bus_space_barrier(sc->bt, sc->bh, IX_DATAPORT, 2, BUS_SPACE_BARRIER_WRITE); } else { - bus_space_write_2(sc->bt, sc->bh, offset, value); + bus_space_write_2(sc->bt, sc->bh, offset, value); bus_space_barrier(sc->bt, sc->bh, offset, 2, BUS_SPACE_BARRIER_WRITE); } @@ -861,11 +863,11 @@ ix_attach(device_t parent, device_t self, void *aux) sc->sc_msize = memsize; sc->sc_maddr = (void*) 0; } else { - sc->bt = ia->ia_memt; - sc->bh = memh; + sc->bt = ia->ia_memt; + sc->bh = memh; - sc->sc_msize = ia->ia_iomem[0].ir_size; - sc->sc_maddr = (void *)memh; + sc->sc_msize = ia->ia_iomem[0].ir_size; + sc->sc_maddr = (void *)memh; } /* Map i/o space. */ @@ -908,7 +910,7 @@ ix_attach(device_t parent, device_t self, void *aux) bus_space_barrier(sc->bt, sc->bh, 0, IX_IOSIZE, BUS_SPACE_BARRIER_WRITE); } else { - bus_space_barrier(sc->bt, sc->bh, 0, sc->sc_msize, + bus_space_barrier(sc->bt, sc->bh, 0, sc->sc_msize, BUS_SPACE_BARRIER_WRITE); } @@ -918,7 +920,8 @@ ix_attach(device_t parent, device_t self, void *aux) bus_space_unmap(iot, ioh, ia->ia_io[0].ir_size); if (ia->ia_iomem[0].ir_size) - bus_space_unmap(ia->ia_memt, memh, ia->ia_iomem[0].ir_size); + bus_space_unmap(ia->ia_memt, memh, + ia->ia_iomem[0].ir_size); return; } @@ -958,7 +961,8 @@ ix_attach(device_t parent, device_t self, void *aux) ix_media, NIX_MEDIA, media); if (isc->use_pio) - aprint_error_dev(self, "unsupported memory config, using PIO to access %d bytes of memory\n", sc->sc_msize); + aprint_error_dev(self, "unsupported memory config, using PIO " + "to access %d bytes of memory\n", sc->sc_msize); isc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq[0].ir_irq, IST_EDGE, IPL_NET, i82586_intr, sc); diff --git a/sys/dev/isa/ioat66.c b/sys/dev/isa/ioat66.c index 724d2b13e06f..b044e7ae1347 100644 --- a/sys/dev/isa/ioat66.c +++ b/sys/dev/isa/ioat66.c @@ -1,4 +1,4 @@ -/* $NetBSD: ioat66.c,v 1.21 2012/10/27 17:18:24 chs Exp $ */ +/* $NetBSD: ioat66.c,v 1.22 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ioat66.c,v 1.21 2012/10/27 17:18:24 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioat66.c,v 1.22 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -160,7 +160,8 @@ ioat66attach(device_t parent, device_t self, void *aux) if (!com_is_console(iot, iobase, &sc->sc_slaveioh[i]) && bus_space_map(iot, iobase, COM_NPORTS, 0, &sc->sc_slaveioh[i])) { - aprint_error_dev(self, "can't map i/o space for slave %d\n", i); + aprint_error_dev(self, + "can't map i/o space for slave %d\n", i); return; } } diff --git a/sys/dev/isa/pcdisplay.c b/sys/dev/isa/pcdisplay.c index eecdeb5adab7..b27c5c119733 100644 --- a/sys/dev/isa/pcdisplay.c +++ b/sys/dev/isa/pcdisplay.c @@ -1,4 +1,4 @@ -/* $NetBSD: pcdisplay.c,v 1.41 2012/10/27 17:18:25 chs Exp $ */ +/* $NetBSD: pcdisplay.c,v 1.42 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.41 2012/10/27 17:18:25 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.42 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -179,7 +179,8 @@ pcdisplay_probe_mono(bus_space_tag_t iot, bus_space_tag_t memt) } static void -pcdisplay_init(struct pcdisplay_config *dc, bus_space_tag_t iot, bus_space_tag_t memt, int mono) +pcdisplay_init(struct pcdisplay_config *dc, bus_space_tag_t iot, + bus_space_tag_t memt, int mono) { struct pcdisplay_handle *ph = &dc->dc_ph; int cpos; @@ -328,7 +329,7 @@ pcdisplay_attach(device_t parent, device_t self, void *aux) aa.accessops = &pcdisplay_accessops; aa.accesscookie = sc; - config_found(self, &aa, wsemuldisplaydevprint); + config_found(self, &aa, wsemuldisplaydevprint); } @@ -376,8 +377,7 @@ pcdisplay_ioctl(void *v, void *vs, u_long cmd, } static paddr_t -pcdisplay_mmap(void *v, void *vs, off_t offset, - int prot) +pcdisplay_mmap(void *v, void *vs, off_t offset, int prot) { return (-1); } @@ -411,9 +411,8 @@ pcdisplay_free_screen(void *v, void *cookie) } static int -pcdisplay_show_screen(void *v, void *cookie, - int waitok, void (*cb)(void *, int, int), - void *cbarg) +pcdisplay_show_screen(void *v, void *cookie, int waitok, + void (*cb)(void *, int, int), void *cbarg) { #ifdef DIAGNOSTIC struct pcdisplay_softc *sc = v; @@ -425,8 +424,7 @@ pcdisplay_show_screen(void *v, void *cookie, } static int -pcdisplay_allocattr(void *id, int fg, int bg, - int flags, long *attrp) +pcdisplay_allocattr(void *id, int fg, int bg, int flags, long *attrp) { if (flags & WSATTR_REVERSE) *attrp = FG_BLACK | BG_LIGHTGREY; diff --git a/sys/dev/mca/if_tr_mca.c b/sys/dev/mca/if_tr_mca.c index 296e2cbf367e..e1e7a778774c 100644 --- a/sys/dev/mca/if_tr_mca.c +++ b/sys/dev/mca/if_tr_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tr_mca.c,v 1.23 2013/11/08 03:12:17 christos Exp $ */ +/* $NetBSD: if_tr_mca.c,v 1.24 2016/07/14 04:19:27 msaitoh Exp $ */ /*_ * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.23 2013/11/08 03:12:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tr_mca.c,v 1.24 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -219,7 +219,8 @@ tr_mca_attach(device_t parent, device_t self, void *aux) /* establish interrupt handler */ sc->sc_ih = mca_intr_establish(ma->ma_mc, irq, IPL_NET, tr_intr, sc); if (sc->sc_ih == NULL) { - aprint_error_dev(self, "couldn't establish interrupt handler\n"); + aprint_error_dev(self, + "couldn't establish interrupt handler\n"); return; } diff --git a/sys/dev/pci/amr.c b/sys/dev/pci/amr.c index 62cdc5ca04b4..6cb05056dcc9 100644 --- a/sys/dev/pci/amr.c +++ b/sys/dev/pci/amr.c @@ -1,4 +1,4 @@ -/* $NetBSD: amr.c,v 1.60 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: amr.c,v 1.61 2016/07/14 04:19:27 msaitoh Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.60 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amr.c,v 1.61 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -131,7 +131,7 @@ const struct cdevsw amr_cdevsw = { .d_kqfilter = nokqfilter, .d_discard = nodiscard, .d_flag = D_OTHER -}; +}; extern struct cfdriver amr_cd; @@ -364,8 +364,8 @@ amr_attach(device_t parent, device_t self, void *aux) if ((rv = bus_dmamem_alloc(amr->amr_dmat, size, PAGE_SIZE, 0, &amr->amr_dmaseg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) { - aprint_error_dev(amr->amr_dv, "unable to allocate buffer, rv = %d\n", - rv); + aprint_error_dev(amr->amr_dv, + "unable to allocate buffer, rv = %d\n", rv); amr_teardown(amr); return; } @@ -383,8 +383,8 @@ amr_attach(device_t parent, device_t self, void *aux) if ((rv = bus_dmamap_create(amr->amr_dmat, size, 1, size, 0, BUS_DMA_NOWAIT, &amr->amr_dmamap)) != 0) { - aprint_error_dev(amr->amr_dv, "unable to create buffer DMA map, rv = %d\n", - rv); + aprint_error_dev(amr->amr_dv, + "unable to create buffer DMA map, rv = %d\n", rv); amr_teardown(amr); return; } @@ -392,8 +392,8 @@ amr_attach(device_t parent, device_t self, void *aux) if ((rv = bus_dmamap_load(amr->amr_dmat, amr->amr_dmamap, amr->amr_mbox, size, NULL, BUS_DMA_NOWAIT)) != 0) { - aprint_error_dev(amr->amr_dv, "unable to load buffer DMA map, rv = %d\n", - rv); + aprint_error_dev(amr->amr_dv, + "unable to load buffer DMA map, rv = %d\n", rv); amr_teardown(amr); return; } @@ -1415,12 +1415,12 @@ static int amropen(dev_t dev, int flag, int mode, struct lwp *l) { struct amr_softc *amr; - + if ((amr = device_lookup_private(&amr_cd, minor(dev))) == NULL) return (ENXIO); if ((amr->amr_flags & AMRF_OPEN) != 0) return (EBUSY); - + amr->amr_flags |= AMRF_OPEN; return (0); } diff --git a/sys/dev/pci/hdaudio_pci.c b/sys/dev/pci/hdaudio_pci.c index 01a430401527..d6dc985c6167 100644 --- a/sys/dev/pci/hdaudio_pci.c +++ b/sys/dev/pci/hdaudio_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio_pci.c,v 1.3 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: hdaudio_pci.c,v 1.4 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.3 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdaudio_pci.c,v 1.4 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -170,9 +170,11 @@ hdaudio_pci_attach(device_t parent, device_t self, void *opaque) sc->sc_hdaudio.sc_memh, sc->sc_hdaudio.sc_memsize); sc->sc_hdaudio.sc_memvalid = false; - csr = pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_COMMAND_STATUS_REG); + csr = pci_conf_read(sc->sc_pc, sc->sc_tag, + PCI_COMMAND_STATUS_REG); csr &= ~(PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_BACKTOBACK_ENABLE); - pci_conf_write(sc->sc_pc, sc->sc_tag, PCI_COMMAND_STATUS_REG, csr); + pci_conf_write(sc->sc_pc, sc->sc_tag, + PCI_COMMAND_STATUS_REG, csr); pmf_device_deregister(self); } } diff --git a/sys/dev/pci/ixpide.c b/sys/dev/pci/ixpide.c index b7a80601dab5..6b562df22475 100644 --- a/sys/dev/pci/ixpide.c +++ b/sys/dev/pci/ixpide.c @@ -1,4 +1,4 @@ -/* $NetBSD: ixpide.c,v 1.24 2012/07/31 15:50:36 bouyer Exp $ */ +/* $NetBSD: ixpide.c,v 1.25 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 2004 The NetBSD Foundation. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ixpide.c,v 1.24 2012/07/31 15:50:36 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ixpide.c,v 1.25 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -43,7 +43,8 @@ static bool ixpide_suspend(device_t, const pmf_qual_t *); static int ixpide_match(device_t, cfdata_t, void *); static void ixpide_attach(device_t, device_t, void *); -static void ixp_chip_map(struct pciide_softc *, const struct pci_attach_args *); +static void ixp_chip_map(struct pciide_softc *, + const struct pci_attach_args *); static void ixp_setup_channel(struct ata_channel *); CFATTACH_DECL_NEW(ixpide, sizeof(struct pciide_softc), @@ -218,6 +219,7 @@ ixp_setup_channel(struct ata_channel *chp) pci_conf_write(sc->sc_pc, sc->sc_tag, IXP_MDMA_TIMING, mdma_timing); pci_conf_write(sc->sc_pc, sc->sc_tag, IXP_PIO_CTL, pio); pci_conf_write(sc->sc_pc, sc->sc_tag, IXP_PIO_TIMING, pio_timing); - ATADEBUG_PRINT(("ixp_setup_channel: udma = %08x, mdma_timing = %08x, pio_mode = %08x," - " pio_timing = %08x\n", udma, mdma_timing, pio, pio_timing), DEBUG_PROBE); + ATADEBUG_PRINT(("ixp_setup_channel: udma = %08x, mdma_timing = %08x, " + "pio_mode = %08x, pio_timing = %08x\n", udma, mdma_timing, pio, + pio_timing), DEBUG_PROBE); } diff --git a/sys/dev/pci/jmide.c b/sys/dev/pci/jmide.c index 5b2f531e01db..a228c1ab0f51 100644 --- a/sys/dev/pci/jmide.c +++ b/sys/dev/pci/jmide.c @@ -1,4 +1,4 @@ -/* $NetBSD: jmide.c,v 1.19 2014/03/29 19:28:25 christos Exp $ */ +/* $NetBSD: jmide.c,v 1.20 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 2007 Manuel Bouyer. @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: jmide.c,v 1.19 2014/03/29 19:28:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: jmide.c,v 1.20 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -48,7 +48,8 @@ static int jmide_match(device_t, cfdata_t, void *); static void jmide_attach(device_t, device_t, void *); static int jmide_intr(void *); -static void jmpata_chip_map(struct pciide_softc*, const struct pci_attach_args*); +static void jmpata_chip_map(struct pciide_softc*, + const struct pci_attach_args*); static void jmpata_setup_channel(struct ata_channel*); static int jmahci_print(void *, const char *); @@ -185,7 +186,8 @@ jmide_attach(device_t parent, device_t self, void *aux) aprint_error("%s: couldn't map interrupt\n", JM_NAME(sc)); return; } - intrstr = pci_intr_string(pa->pa_pc, intrhandle, intrbuf, sizeof(intrbuf)); + intrstr = pci_intr_string(pa->pa_pc, intrhandle, intrbuf, + sizeof(intrbuf)); sc->sc_pciide.sc_pci_ih = pci_intr_establish(pa->pa_pc, intrhandle, IPL_BIO, jmide_intr, sc); if (sc->sc_pciide.sc_pci_ih == NULL) { @@ -286,7 +288,6 @@ jmide_attach(device_t parent, device_t self, void *aux) pp->ide_name = NULL; pp->chip_map = jmpata_chip_map; pciide_common_attach(&sc->sc_pciide, pa, pp); - } static int diff --git a/sys/dev/pci/mpt_pci.c b/sys/dev/pci/mpt_pci.c index d76185ec7053..0666c1a6a49d 100644 --- a/sys/dev/pci/mpt_pci.c +++ b/sys/dev/pci/mpt_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: mpt_pci.c,v 1.24 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: mpt_pci.c,v 1.25 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mpt_pci.c,v 1.24 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpt_pci.c,v 1.25 2016/07/14 04:19:27 msaitoh Exp $"); #include /* pulls in all headers */ @@ -163,7 +163,7 @@ mpt_pci_attach(device_t parent, device_t self, void *aux) mpt->sc_st = memt; mpt->sc_sh = memh; } else { - aprint_error_dev(mpt->sc_dev, "unable to map device registers\n"); + aprint_error_dev(self, "unable to map device registers\n"); return; } @@ -219,8 +219,7 @@ mpt_pci_attach(device_t parent, device_t self, void *aux) /* Allocate DMA memory. */ if (mpt_dma_mem_alloc(mpt) != 0) { - aprint_error_dev(mpt->sc_dev, - "unable to allocate DMA memory\n"); + aprint_error_dev(self, "unable to allocate DMA memory\n"); return; } diff --git a/sys/dev/pci/siisata_pci.c b/sys/dev/pci/siisata_pci.c index dfb8af70cfb9..28550f04ca51 100644 --- a/sys/dev/pci/siisata_pci.c +++ b/sys/dev/pci/siisata_pci.c @@ -1,4 +1,4 @@ -/* $NetBSD: siisata_pci.c,v 1.13 2014/03/29 19:28:25 christos Exp $ */ +/* $NetBSD: siisata_pci.c,v 1.14 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -51,7 +51,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: siisata_pci.c,v 1.13 2014/03/29 19:28:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: siisata_pci.c,v 1.14 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -92,7 +92,7 @@ static const struct siisata_pci_board siisata_pci_boards[] = { { .spb_vend = PCI_VENDOR_CMDTECH, .spb_prod = PCI_PRODUCT_CMDTECH_3132, - .spb_port = 2, + .spb_port = 2, .spb_chip = 3132, }, { @@ -150,7 +150,7 @@ siisata_pci_attach(device_t parent, device_t self, void *aux) char intrbuf[PCI_INTRSTR_LEN]; sc->sc_atac.atac_dev = self; - + psc->sc_pc = pa->pa_pc; psc->sc_pcitag = pa->pa_tag; @@ -209,7 +209,8 @@ siisata_pci_attach(device_t parent, device_t self, void *aux) aprint_error_dev(self, "couldn't map interrupt\n"); return; } - intrstr = pci_intr_string(pa->pa_pc, intrhandle, intrbuf, sizeof(intrbuf)); + intrstr = pci_intr_string(pa->pa_pc, intrhandle, intrbuf, + sizeof(intrbuf)); psc->sc_ih = pci_intr_establish(pa->pa_pc, intrhandle, IPL_BIO, siisata_intr, sc); if (psc->sc_ih == NULL) { @@ -289,7 +290,7 @@ siisata_pci_detach(device_t dv, int flags) bus_space_unmap(sc->sc_prt, sc->sc_prh, sc->sc_prs); bus_space_unmap(sc->sc_grt, sc->sc_grh, sc->sc_grs); - + return 0; } @@ -303,6 +304,6 @@ siisata_pci_resume(device_t dv, const pmf_qual_t *qual) s = splbio(); siisata_resume(sc); splx(s); - + return true; } diff --git a/sys/dev/pci/twe.c b/sys/dev/pci/twe.c index 76c87c8ede11..0067f0047212 100644 --- a/sys/dev/pci/twe.c +++ b/sys/dev/pci/twe.c @@ -1,4 +1,4 @@ -/* $NetBSD: twe.c,v 1.104 2016/07/07 06:55:41 msaitoh Exp $ */ +/* $NetBSD: twe.c,v 1.105 2016/07/14 04:19:27 msaitoh Exp $ */ /*- * Copyright (c) 2000, 2001, 2002, 2003, 2004 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.104 2016/07/07 06:55:41 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: twe.c,v 1.105 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -110,8 +110,8 @@ static int twe_reset(struct twe_softc *); static int twe_status_check(struct twe_softc *, u_int); static int twe_status_wait(struct twe_softc *, u_int, int); static void twe_describe_controller(struct twe_softc *); -static void twe_clear_pci_abort(struct twe_softc *sc); -static void twe_clear_pci_parity_error(struct twe_softc *sc); +static void twe_clear_pci_abort(struct twe_softc *sc); +static void twe_clear_pci_parity_error(struct twe_softc *sc); static int twe_add_unit(struct twe_softc *, int); static int twe_del_unit(struct twe_softc *, int); @@ -368,26 +368,30 @@ twe_attach(device_t parent, device_t self, void *aux) if ((rv = bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) { - aprint_error_dev(self, "unable to allocate commands, rv = %d\n", rv); + aprint_error_dev(self, + "unable to allocate commands, rv = %d\n", rv); return; } if ((rv = bus_dmamem_map(sc->sc_dmat, &seg, rseg, size, (void **)&sc->sc_cmds, BUS_DMA_NOWAIT | BUS_DMA_COHERENT)) != 0) { - aprint_error_dev(self, "unable to map commands, rv = %d\n", rv); + aprint_error_dev(self, + "unable to map commands, rv = %d\n", rv); return; } if ((rv = bus_dmamap_create(sc->sc_dmat, size, size, 1, 0, BUS_DMA_NOWAIT, &sc->sc_dmamap)) != 0) { - aprint_error_dev(self, "unable to create command DMA map, rv = %d\n", rv); + aprint_error_dev(self, + "unable to create command DMA map, rv = %d\n", rv); return; } if ((rv = bus_dmamap_load(sc->sc_dmat, sc->sc_dmamap, sc->sc_cmds, size, NULL, BUS_DMA_NOWAIT)) != 0) { - aprint_error_dev(self, "unable to load command DMA map, rv = %d\n", rv); + aprint_error_dev(self, + "unable to load command DMA map, rv = %d\n", rv); return; } @@ -414,7 +418,8 @@ twe_attach(device_t parent, device_t self, void *aux) BUS_DMA_NOWAIT | BUS_DMA_ALLOCNOW, &ccb->ccb_dmamap_xfer); if (rv != 0) { - aprint_error_dev(self, "can't create dmamap, rv = %d\n", rv); + aprint_error_dev(self, + "can't create dmamap, rv = %d\n", rv); return; } @@ -463,7 +468,7 @@ twe_attach(device_t parent, device_t self, void *aux) NULL, 0, NULL, 0, CTL_HW, CTL_CREATE, CTL_EOL) != 0) { aprint_error_dev(self, "could not create %s.%s sysctl node\n", - "hw", device_xname(self)); + "hw", device_xname(self)); return; } if ((i = sysctl_createv(NULL, 0, NULL, NULL, @@ -472,8 +477,9 @@ twe_attach(device_t parent, device_t self, void *aux) NULL, 0, __UNCONST(&twever), 0, CTL_HW, node->sysctl_num, CTL_CREATE, CTL_EOL)) != 0) { - aprint_error_dev(self, "could not create %s.%s.driver_version sysctl\n", - "hw", device_xname(self)); + aprint_error_dev(self, + "could not create %s.%s.driver_version sysctl\n", + "hw", device_xname(self)); return; } } @@ -534,8 +540,8 @@ twe_add_unit(struct twe_softc *sc, int unit) rv = twe_param_get(sc, TWE_PARAM_UNITSUMMARY, TWE_PARAM_UNITSUMMARY_Status, TWE_MAX_UNITS, NULL, &dtp); if (rv != 0) { - aprint_error_dev(sc->sc_dev, "error %d fetching unit summary\n", - rv); + aprint_error_dev(sc->sc_dev, + "error %d fetching unit summary\n", rv); return (rv); } @@ -556,16 +562,18 @@ twe_add_unit(struct twe_softc *sc, int unit) rv = twe_param_get_2(sc, TWE_PARAM_UNITINFO + unit, TWE_PARAM_UNITINFO_DescriptorSize, &dsize); if (rv != 0) { - aprint_error_dev(sc->sc_dev, "error %d fetching descriptor size " - "for unit %d\n", rv, unit); + aprint_error_dev(sc->sc_dev, + "error %d fetching descriptor size for unit %d\n", + rv, unit); goto out; } rv = twe_param_get(sc, TWE_PARAM_UNITINFO + unit, TWE_PARAM_UNITINFO_Descriptor, dsize - 3, NULL, &atp); if (rv != 0) { - aprint_error_dev(sc->sc_dev, "error %d fetching array descriptor " - "for unit %d\n", rv, unit); + aprint_error_dev(sc->sc_dev, + "error %d fetching array descriptor for unit %d\n", + rv, unit); goto out; } @@ -668,7 +676,8 @@ twe_reset(struct twe_softc *sc) /* Wait for attention... */ if (twe_status_wait(sc, TWE_STS_ATTN_INTR, 30)) { - aprint_error_dev(sc->sc_dev, "timeout waiting for attention interrupt\n"); + aprint_error_dev(sc->sc_dev, + "timeout waiting for attention interrupt\n"); return (-1); } @@ -717,7 +726,8 @@ twe_reset(struct twe_softc *sc) for (;;) { status = twe_inl(sc, TWE_REG_STS); if (twe_status_check(sc, status) != 0) { - aprint_error_dev(sc->sc_dev, "can't drain response queue\n"); + aprint_error_dev(sc->sc_dev, + "can't drain response queue\n"); return (-1); } if ((status & TWE_STS_RESP_QUEUE_EMPTY) != 0) @@ -775,7 +785,8 @@ twe_intr(void *arg) if ((status & TWE_STS_ATTN_INTR) != 0) { rv = twe_aen_get(sc, NULL); if (rv != 0) - aprint_error_dev(sc->sc_dev, "unable to retrieve AEN (%d)\n", rv); + aprint_error_dev(sc->sc_dev, + "unable to retrieve AEN (%d)\n", rv); else twe_outl(sc, TWE_REG_CTL, TWE_CTL_CLEAR_ATTN_INTR); caught = 1; @@ -925,7 +936,8 @@ twe_aen_handler(struct twe_ccb *ccb, int error) */ rv = twe_aen_get(sc, NULL); if (rv != 0) - aprint_error_dev(sc->sc_dev, "unable to retrieve AEN (%d)\n", rv); + aprint_error_dev(sc->sc_dev, + "unable to retrieve AEN (%d)\n", rv); } static void @@ -940,7 +952,8 @@ twe_aen_enqueue(struct twe_softc *sc, uint16_t aen, int quiet) if (! quiet) { str = twe_describe_code(twe_table_aen, TWE_AEN_CODE(aen)); if (str == NULL) { - aprint_error_dev(sc->sc_dev, "unknown AEN 0x%04x\n", aen); + aprint_error_dev(sc->sc_dev, + "unknown AEN 0x%04x\n", aen); } else { msg = str + 3; switch (str[1]) { @@ -1312,7 +1325,8 @@ twe_status_wait(struct twe_softc *sc, u_int32_t status, int timo) static void twe_clear_pci_parity_error(struct twe_softc *sc) { - bus_space_write_4(sc->sc_iot, sc->sc_ioh, 0x0, TWE_CTL_CLEAR_PARITY_ERROR); + bus_space_write_4(sc->sc_iot, sc->sc_ioh, 0x0, + TWE_CTL_CLEAR_PARITY_ERROR); //FreeBSD: pci_write_config(sc->twe_dev, PCIR_STATUS, TWE_PCI_CLEAR_PARITY_ERROR, 2); } @@ -1350,8 +1364,8 @@ twe_status_check(struct twe_softc *sc, u_int status) status & TWE_STS_UNEXPECTED_BITS); rv = -1; if (status & TWE_STS_PCI_PARITY_ERROR) { - aprint_error_dev(sc->sc_dev, "PCI parity error: Reseat card, move card " - "or buggy device present.\n"); + aprint_error_dev(sc->sc_dev, "PCI parity error: Reseat" + " card, move card or buggy device present.\n"); twe_clear_pci_parity_error(sc); } if (status & TWE_STS_PCI_ABORT) { @@ -1718,8 +1732,7 @@ twe_ccb_wait_handler(struct twe_ccb *ccb, int error) * Handle control operations. */ static int -tweioctl(dev_t dev, u_long cmd, void *data, int flag, - struct lwp *l) +tweioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) { struct twe_softc *twe; struct twe_ccb *ccb; @@ -1928,16 +1941,18 @@ twe_describe_controller(struct twe_softc *sc) if (rv) { /* some error occurred */ - aprint_error_dev(sc->sc_dev, "failed to fetch version information\n"); + aprint_error_dev(sc->sc_dev, + "failed to fetch version information\n"); return; } aprint_normal_dev(sc->sc_dev, "%d ports, Firmware %.16s, BIOS %.16s\n", - ports, p[1]->tp_data, p[2]->tp_data); + ports, p[1]->tp_data, p[2]->tp_data); - aprint_verbose_dev(sc->sc_dev, "Monitor %.16s, PCB %.8s, Achip %.8s, Pchip %.8s\n", - p[0]->tp_data, p[3]->tp_data, - p[4]->tp_data, p[5]->tp_data); + aprint_verbose_dev(sc->sc_dev, + "Monitor %.16s, PCB %.8s, Achip %.8s, Pchip %.8s\n", + p[0]->tp_data, p[3]->tp_data, + p[4]->tp_data, p[5]->tp_data); free(p[0], M_DEVBUF); free(p[1], M_DEVBUF); @@ -1949,7 +1964,8 @@ twe_describe_controller(struct twe_softc *sc) rv = twe_param_get(sc, TWE_PARAM_DRIVESUMMARY, TWE_PARAM_DRIVESUMMARY_Status, 16, NULL, &p[0]); if (rv) { - aprint_error_dev(sc->sc_dev, "failed to get drive status summary\n"); + aprint_error_dev(sc->sc_dev, + "failed to get drive status summary\n"); return; } for (i = 0; i < ports; i++) { @@ -1958,7 +1974,7 @@ twe_describe_controller(struct twe_softc *sc) rv = twe_param_get_4(sc, TWE_PARAM_DRIVEINFO + i, TWE_PARAM_DRIVEINFO_Size, &dsize); if (rv) { - aprint_error_dev(sc->sc_dev, + aprint_error_dev(sc->sc_dev, "unable to get drive size for port %d\n", i); continue; } diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index 429b3fc250d2..9e0ac56f57a0 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $NetBSD: yds.c,v 1.56 2014/08/17 08:54:44 tsutsui Exp $ */ +/* $NetBSD: yds.c,v 1.57 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 2000, 2001 Kazuki Sakamoto and Minoura Makoto. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: yds.c,v 1.56 2014/08/17 08:54:44 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: yds.c,v 1.57 2016/07/14 04:19:27 msaitoh Exp $"); #include "mpu.h" @@ -918,7 +918,8 @@ detected: r = ac97_attach(&codec->host_if, self, &sc->sc_lock); if (r != 0) { - aprint_error_dev(self, "can't attach codec (error 0x%X)\n", r); + aprint_error_dev(self, + "can't attach codec (error 0x%X)\n", r); mutex_destroy(&sc->sc_lock); mutex_destroy(&sc->sc_intr_lock); return; diff --git a/sys/dev/pcmcia/if_awi_pcmcia.c b/sys/dev/pcmcia/if_awi_pcmcia.c index d2528eed460a..1d2642ad146d 100644 --- a/sys/dev/pcmcia/if_awi_pcmcia.c +++ b/sys/dev/pcmcia/if_awi_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_awi_pcmcia.c,v 1.45 2012/10/27 17:18:36 chs Exp $ */ +/* $NetBSD: if_awi_pcmcia.c,v 1.46 2016/07/14 04:19:27 msaitoh Exp $ */ /*- * Copyright (c) 1999, 2004 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_awi_pcmcia.c,v 1.45 2012/10/27 17:18:36 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_awi_pcmcia.c,v 1.46 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -150,8 +150,7 @@ awi_pcmcia_disable(struct awi_softc *sc) } static int -awi_pcmcia_match(device_t parent, cfdata_t match, - void *aux) +awi_pcmcia_match(device_t parent, cfdata_t match, void *aux) { struct pcmcia_attach_args *pa = aux; @@ -178,8 +177,7 @@ awi_pcmcia_validate_config(struct pcmcia_config_entry *cfe) } static void -awi_pcmcia_attach(device_t parent, device_t self, - void *aux) +awi_pcmcia_attach(device_t parent, device_t self, void *aux) { struct awi_pcmcia_softc *psc = device_private(self); struct awi_softc *sc = &psc->sc_awi; @@ -192,8 +190,7 @@ awi_pcmcia_attach(device_t parent, device_t self, error = pcmcia_function_configure(pa->pf, awi_pcmcia_validate_config); if (error) { - aprint_error_dev(self, "configure failed, error=%d\n", - error); + aprint_error_dev(self, "configure failed, error=%d\n", error); return; } diff --git a/sys/dev/usb/ubt.c b/sys/dev/usb/ubt.c index 98b65affba3e..a91bdc2e0637 100644 --- a/sys/dev/usb/ubt.c +++ b/sys/dev/usb/ubt.c @@ -1,4 +1,4 @@ -/* $NetBSD: ubt.c,v 1.55 2016/07/07 06:55:42 msaitoh Exp $ */ +/* $NetBSD: ubt.c,v 1.56 2016/07/14 04:19:27 msaitoh Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -67,7 +67,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.55 2016/07/07 06:55:42 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.56 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -441,19 +441,19 @@ ubt_match(device_t parent, cfdata_t match, void *aux) DPRINTFN(50, "ubt_match\n"); for (i = 0; i < __arraycount(ubt_dev); i++) { - if (ubt_dev[i].vendor != -1 + if (ubt_dev[i].vendor != -1 && ubt_dev[i].vendor != (int)uaa->uaa_vendor) continue; - if (ubt_dev[i].product != -1 + if (ubt_dev[i].product != -1 && ubt_dev[i].product != (int)uaa->uaa_product) continue; - if (ubt_dev[i].class != -1 + if (ubt_dev[i].class != -1 && ubt_dev[i].class != uaa->uaa_class) continue; - if (ubt_dev[i].subclass != -1 + if (ubt_dev[i].subclass != -1 && ubt_dev[i].subclass != uaa->uaa_subclass) continue; - if (ubt_dev[i].proto != -1 + if (ubt_dev[i].proto != -1 && ubt_dev[i].proto != uaa->uaa_proto) continue; @@ -496,7 +496,8 @@ ubt_attach(device_t parent, device_t self, void *aux) */ err = usbd_set_config_index(sc->sc_udev, 0, 1); if (err) { - aprint_error_dev(self, "failed to set configuration idx 0: %s\n", + aprint_error_dev(self, + "failed to set configuration idx 0: %s\n", usbd_errstr(err)); return; @@ -510,8 +511,9 @@ ubt_attach(device_t parent, device_t self, void *aux) */ err = usbd_device2interface_handle(sc->sc_udev, 0, &sc->sc_iface0); if (err) { - aprint_error_dev(self, "Could not get interface 0 handle %s (%d)\n", - usbd_errstr(err), err); + aprint_error_dev(self, + "Could not get interface 0 handle %s (%d)\n", + usbd_errstr(err), err); return; } diff --git a/sys/dev/usb/uyap.c b/sys/dev/usb/uyap.c index 8bbcf59906f7..f684160289ac 100644 --- a/sys/dev/usb/uyap.c +++ b/sys/dev/usb/uyap.c @@ -1,4 +1,4 @@ -/* $NetBSD: uyap.c,v 1.20 2016/04/23 10:15:32 skrll Exp $ */ +/* $NetBSD: uyap.c,v 1.21 2016/07/14 04:19:27 msaitoh Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uyap.c,v 1.20 2016/04/23 10:15:32 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uyap.c,v 1.21 2016/07/14 04:19:27 msaitoh Exp $"); #include #include @@ -53,14 +53,15 @@ struct uyap_softc { device_t sc_dev; /* base device */ }; -int uyap_match(device_t, cfdata_t, void *); -void uyap_attach(device_t, device_t, void *); -int uyap_detach(device_t, int); -int uyap_activate(device_t, enum devact); +int uyap_match(device_t, cfdata_t, void *); +void uyap_attach(device_t, device_t, void *); +int uyap_detach(device_t, int); +int uyap_activate(device_t, enum devact); extern struct cfdriver uyap_cd; -CFATTACH_DECL_NEW(uyap, sizeof(struct uyap_softc), uyap_match, uyap_attach, uyap_detach, uyap_activate); +CFATTACH_DECL_NEW(uyap, sizeof(struct uyap_softc), uyap_match, uyap_attach, + uyap_detach, uyap_activate); -int +int uyap_match(device_t parent, cfdata_t match, void *aux) { struct usb_attach_arg *uaa = aux; @@ -73,7 +74,7 @@ uyap_match(device_t parent, cfdata_t match, void *aux) return (UMATCH_NONE); } -void +void uyap_attach(device_t parent, device_t self, void *aux) { struct uyap_softc *sc = device_private(self); @@ -105,7 +106,7 @@ uyap_attach(device_t parent, device_t self, void *aux) return; } -int +int uyap_detach(device_t self, int flags) { #if 0