Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys Use int for return type for [eou]chi_init and motg_...



details:   https://anonhg.NetBSD.org/src/rev/0a781983fd0e
branches:  nick-nhusb
changeset: 334077:0a781983fd0e
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Dec 05 13:23:37 2014 +0000

description:
Use int for return type for [eou]chi_init and motg_init.

diffstat:

 sys/arch/arm/allwinner/awin_usb.c      |   4 ++--
 sys/arch/arm/at91/at91ohci.c           |  13 ++++++-------
 sys/arch/arm/broadcom/bcm53xx_usb.c    |   4 ++--
 sys/arch/arm/ep93xx/epohci.c           |  11 +++++------
 sys/arch/arm/gemini/obio_ehci.c        |  11 +++++------
 sys/arch/arm/imx/imxusb.c              |  11 +++++------
 sys/arch/arm/omap/obio_ohci.c          |  13 ++++++-------
 sys/arch/arm/omap/omapl1x_ohci.c       |   9 ++++-----
 sys/arch/arm/s3c2xx0/ohci_s3c24x0.c    |  12 +++++-------
 sys/arch/arm/samsung/exynos_usb.c      |  18 ++++++++----------
 sys/arch/arm/xscale/pxa2x0_ohci.c      |   9 ++++-----
 sys/arch/hpcmips/dev/plumohci.c        |  11 +++++------
 sys/arch/i386/pci/gcscehci.c           |  11 +++++------
 sys/arch/mips/alchemy/dev/ohci_aubus.c |  20 +++++++++++---------
 sys/arch/mips/atheros/dev/ehci_arbus.c |  11 +++++------
 sys/arch/mips/atheros/dev/ohci_arbus.c |  11 +++++------
 sys/arch/mips/ralink/ralink_ehci.c     |  11 +++++------
 sys/arch/mips/ralink/ralink_ohci.c     |  11 +++++------
 sys/arch/mips/rmi/rmixl_ehci.c         |  11 +++++------
 sys/arch/mips/rmi/rmixl_ohci.c         |  11 +++++------
 sys/arch/playstation2/dev/ohci_sbus.c  |  11 +++++------
 sys/dev/cardbus/ehci_cardbus.c         |  11 +++++------
 sys/dev/cardbus/ohci_cardbus.c         |  11 +++++------
 sys/dev/cardbus/uhci_cardbus.c         |  11 +++++------
 sys/dev/marvell/ehci_mv.c              |  11 +++++------
 sys/dev/pci/ehci_pci.c                 |  11 +++++------
 sys/dev/pci/ohci_pci.c                 |  11 +++++------
 sys/dev/pci/uhci_pci.c                 |  11 +++++------
 sys/dev/usb/ehci.c                     |  18 +++++++++---------
 sys/dev/usb/ehcivar.h                  |   4 ++--
 sys/dev/usb/motg.c                     |  12 ++++++------
 sys/dev/usb/motgvar.h                  |   4 ++--
 sys/dev/usb/ohci.c                     |  20 ++++++++++----------
 sys/dev/usb/ohcivar.h                  |   4 ++--
 sys/dev/usb/uhci.c                     |  16 ++++++++--------
 sys/dev/usb/uhcivar.h                  |   4 ++--
 36 files changed, 184 insertions(+), 209 deletions(-)

diffs (truncated from 1462 to 300 lines):

diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/allwinner/awin_usb.c
--- a/sys/arch/arm/allwinner/awin_usb.c Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/allwinner/awin_usb.c Fri Dec 05 13:23:37 2014 +0000
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: awin_usb.c,v 1.17.2.2 2014/12/03 12:52:04 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_usb.c,v 1.17.2.3 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -140,7 +140,7 @@
        aprint_normal(": OHCI USB controller\n");
 
        int error = ohci_init(sc);
-       if (error != USBD_NORMAL_COMPLETION) {
+       if (error) {
                aprint_error_dev(self, "init failed, error=%d\n", error);
                return;
        }
diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/at91/at91ohci.c
--- a/sys/arch/arm/at91/at91ohci.c      Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/at91/at91ohci.c      Fri Dec 05 13:23:37 2014 +0000
@@ -1,5 +1,5 @@
-/*     $Id: at91ohci.c,v 1.5.28.3 2014/12/05 09:37:48 skrll Exp $      */
-/*     $NetBSD: at91ohci.c,v 1.5.28.3 2014/12/05 09:37:48 skrll Exp $  */
+/*     $Id: at91ohci.c,v 1.5.28.4 2014/12/05 13:23:37 skrll Exp $      */
+/*     $NetBSD: at91ohci.c,v 1.5.28.4 2014/12/05 13:23:37 skrll Exp $  */
 
 /*-
  * Copyright (c) 2007 Embedtronics Oy.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91ohci.c,v 1.5.28.3 2014/12/05 09:37:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91ohci.c,v 1.5.28.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -121,7 +121,6 @@
 at91ohci_callback(device_t self)
 {
        struct at91ohci_softc *sc = device_private(self);
-       usbd_status r;
 
        /* Disable interrupts, so we don't get any spurious ones. */
        bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE,
@@ -130,10 +129,10 @@
        strlcpy(sc->sc.sc_vendor, "Atmel", sizeof sc->sc.sc_vendor);
 
        sc->sc_ih = at91_intr_establish(sc->sc_pid, IPL_USB, INTR_HIGH_LEVEL, ohci_intr, sc);
-       r = ohci_init(&sc->sc);
+       int err = ohci_init(&sc->sc);
 
-       if (r != USBD_NORMAL_COMPLETION) {
-               printf("%s: init failed, error=%d\n", device_xname(self), r);
+       if (err) {
+               printf("%s: init failed, error=%d\n", device_xname(self), err);
 
                at91_intr_disestablish(sc->sc_ih);
                return;
diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/broadcom/bcm53xx_usb.c
--- a/sys/arch/arm/broadcom/bcm53xx_usb.c       Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/broadcom/bcm53xx_usb.c       Fri Dec 05 13:23:37 2014 +0000
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: bcm53xx_usb.c,v 1.6.4.1 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: bcm53xx_usb.c,v 1.6.4.2 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -123,7 +123,7 @@
        aprint_normal(": OHCI USB controller\n");
 
        int error = ohci_init(sc);
-       if (error != USBD_NORMAL_COMPLETION) {
+       if (error) {
                aprint_error_dev(self, "init failed, error=%d\n", error);
                return;
        }
diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/ep93xx/epohci.c
--- a/sys/arch/arm/ep93xx/epohci.c      Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/ep93xx/epohci.c      Fri Dec 05 13:23:37 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: epohci.c,v 1.7.14.3 2014/12/05 09:37:48 skrll Exp $ */
+/*     $NetBSD: epohci.c,v 1.7.14.4 2014/12/05 13:23:37 skrll Exp $ */
 
 /*-
  * Copyright (c) 2004 Jesse Off
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: epohci.c,v 1.7.14.3 2014/12/05 09:37:48 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: epohci.c,v 1.7.14.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -135,7 +135,6 @@
 epohci_callback(device_t self)
 {
        struct epohci_softc *sc = device_private(self);
-       usbd_status r;
 
        /* Disable interrupts, so we don't get any spurious ones. */
        bus_space_write_4(sc->sc.iot, sc->sc.ioh, OHCI_INTERRUPT_DISABLE,
@@ -145,10 +144,10 @@
 
        sc->sc_ih = ep93xx_intr_establish(sc->sc_intr, IPL_USB,
                ohci_intr, sc);
-       r = ohci_init(&sc->sc);
+       int err = ohci_init(&sc->sc);
 
-       if (r != USBD_NORMAL_COMPLETION) {
-               printf("%s: init failed, error=%d\n", device_xname(self), r);
+       if (err) {
+               printf("%s: init failed, error=%d\n", device_xname(self), err);
 
                ep93xx_intr_disestablish(sc->sc_ih);
                return;
diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/gemini/obio_ehci.c
--- a/sys/arch/arm/gemini/obio_ehci.c   Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/gemini/obio_ehci.c   Fri Dec 05 13:23:37 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: obio_ehci.c,v 1.3.16.1 2014/12/03 12:52:05 skrll Exp $ */
+/*     $NetBSD: obio_ehci.c,v 1.3.16.2 2014/12/05 13:23:37 skrll Exp $ */
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio_ehci.c,v 1.3.16.1 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_ehci.c,v 1.3.16.2 2014/12/05 13:23:37 skrll Exp $");
 
 #include "locators.h"
 
@@ -101,7 +101,6 @@
        struct ehci_softc * const sc = device_private(self);
        struct obio_attach_args * const obio = aux;
        const char * const devname = device_xname(self);
-       usbd_status r;
 
        sc->sc_dev = self;
        sc->sc_bus.ub_hcpriv = sc;
@@ -137,9 +136,9 @@
        sc->sc_id_vendor = PCI_VENDOR_FARADAY;
        strlcpy(sc->sc_vendor, "SL351x", sizeof(sc->sc_vendor));
 
-       r = ehci_init(sc);
-       if (r != USBD_NORMAL_COMPLETION) {
-               aprint_error("%s: init failed, error=%d\n", devname, r);
+       int err = ehci_init(sc);
+       if (err) {
+               aprint_error("%s: init failed, error=%d\n", devname, err);
                return;
        }
 
diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/imx/imxusb.c
--- a/sys/arch/arm/imx/imxusb.c Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/imx/imxusb.c Fri Dec 05 13:23:37 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: imxusb.c,v 1.7.2.2 2014/12/03 12:52:05 skrll Exp $     */
+/*     $NetBSD: imxusb.c,v 1.7.2.3 2014/12/05 13:23:37 skrll Exp $     */
 /*
  * Copyright (c) 2009, 2010  Genetec Corporation.  All rights reserved.
  * Written by Hashimoto Kenichi and Hiroyuki Bessho for Genetec Corporation.
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxusb.c,v 1.7.2.2 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxusb.c,v 1.7.2.3 2014/12/05 13:23:37 skrll Exp $");
 
 #include "opt_imx.h"
 
@@ -88,7 +88,6 @@
        ehci_softc_t *hsc = &sc->sc_hsc;
        bus_space_tag_t iot;
        uint16_t hcirev;
-       usbd_status r;
        uint32_t id, hwhost, hwdevice;
        const char *comma;
 
@@ -204,9 +203,9 @@
        /* Figure out vendor for root hub descriptor. */
        strlcpy(hsc->sc_vendor, "i.MX", sizeof(hsc->sc_vendor));
 
-       r = ehci_init(hsc);
-       if (r != USBD_NORMAL_COMPLETION) {
-               aprint_error_dev(self, "init failed, error=%d\n", r);
+       int err = ehci_init(hsc);
+       if (err) {
+               aprint_error_dev(self, "init failed, error=%d\n", err);
                return;
        }
 
diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/omap/obio_ohci.c
--- a/sys/arch/arm/omap/obio_ohci.c     Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/omap/obio_ohci.c     Fri Dec 05 13:23:37 2014 +0000
@@ -1,7 +1,7 @@
-/*     $Id: obio_ohci.c,v 1.10.6.1 2014/12/03 12:52:05 skrll Exp $     */
+/*     $Id: obio_ohci.c,v 1.10.6.2 2014/12/05 13:23:37 skrll Exp $     */
 
 /* adapted from: */
-/*     $NetBSD: obio_ohci.c,v 1.10.6.1 2014/12/03 12:52:05 skrll Exp $ */
+/*     $NetBSD: obio_ohci.c,v 1.10.6.2 2014/12/05 13:23:37 skrll Exp $ */
 /*     $OpenBSD: pxa2x0_ohci.c,v 1.19 2005/04/08 02:32:54 dlg Exp $ */
 
 /*
@@ -24,7 +24,7 @@
 #include "locators.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obio_ohci.c,v 1.10.6.1 2014/12/03 12:52:05 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obio_ohci.c,v 1.10.6.2 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -105,7 +105,6 @@
        struct obio_softc *psc = device_private(parent);
        struct obioohci_softc *sc = device_private(self);
        struct obio_attach_args *obio = aux;
-       usbd_status r;
 
        KASSERT(psc->sc_obio_dev == NULL);
        psc->sc_obio_dev = self;
@@ -150,9 +149,9 @@
        }
 
        strlcpy(sc->sc.sc_vendor, "OMAP", sizeof(sc->sc.sc_vendor));
-       r = ohci_init(&sc->sc);
-       if (r != USBD_NORMAL_COMPLETION) {
-               aprint_error_dev(self, "init failed, error=%d\n", r);
+       int err = ohci_init(&sc->sc);
+       if (err) {
+               aprint_error_dev(self, "init failed, error=%d\n", err);
                goto free_intr;
        }
 
diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/omap/omapl1x_ohci.c
--- a/sys/arch/arm/omap/omapl1x_ohci.c  Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/omap/omapl1x_ohci.c  Fri Dec 05 13:23:37 2014 +0000
@@ -41,7 +41,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: omapl1x_ohci.c,v 1.1.12.3 2014/12/04 07:53:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: omapl1x_ohci.c,v 1.1.12.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -92,7 +92,6 @@
 {
        struct omapl1xohci_softc *sc = device_private(self);
        struct tipb_attach_args *tipb = aux;
-       usbd_status r;
 
        /* Map OHCI registers */
        if (bus_space_map(tipb->tipb_iot, tipb->tipb_addr, tipb->tipb_size, 0,
@@ -150,9 +149,9 @@
 
        strlcpy(sc->sc.sc_vendor, "OMAPL1X", sizeof sc->sc.sc_vendor);
 
-       r = ohci_init(&sc->sc);
-       if (r != USBD_NORMAL_COMPLETION) {
-               aprint_error_dev(self, "init failed, error=%d\n", r);
+       int err = ohci_init(&sc->sc);
+       if (err) {
+               aprint_error_dev(self, "init failed, error=%d\n", err);
                return;
        }
 
diff -r ddeb4db989d3 -r 0a781983fd0e sys/arch/arm/s3c2xx0/ohci_s3c24x0.c
--- a/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c       Fri Dec 05 09:37:48 2014 +0000
+++ b/sys/arch/arm/s3c2xx0/ohci_s3c24x0.c       Fri Dec 05 13:23:37 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ohci_s3c24x0.c,v 1.8.30.3 2014/12/05 09:37:49 skrll Exp $ */
+/*     $NetBSD: ohci_s3c24x0.c,v 1.8.30.4 2014/12/05 13:23:37 skrll Exp $ */
 
 /* derived from ohci_pci.c */
 
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ohci_s3c24x0.c,v 1.8.30.3 2014/12/05 09:37:49 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ohci_s3c24x0.c,v 1.8.30.4 2014/12/05 13:23:37 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,8 +89,6 @@
        struct ohci_ssio_softc *sc = device_private(self);
        struct s3c2xx0_attach_args *sa = (struct s3c2xx0_attach_args *)aux;
 



Home | Main Index | Thread Index | Old Index