Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Change spaces to tabs and remove some unnecessar...



details:   https://anonhg.NetBSD.org/src/rev/26f3b4996b5a
branches:  trunk
changeset: 747170:26f3b4996b5a
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Fri Sep 04 18:10:08 2009 +0000

description:
Change spaces to tabs and remove some unnecessary parentheses.  No
functional change intended.

diffstat:

 sys/dev/usb/if_atu.c     |   24 ++--
 sys/dev/usb/if_atureg.h  |    4 +-
 sys/dev/usb/if_aue.c     |  222 ++++++++++++++++++----------------------------
 sys/dev/usb/if_auereg.h  |    6 +-
 sys/dev/usb/if_axe.c     |   85 ++++++++---------
 sys/dev/usb/if_axereg.h  |    6 +-
 sys/dev/usb/if_cdce.c    |   80 ++++++----------
 sys/dev/usb/if_cdcereg.h |    4 +-
 sys/dev/usb/if_cuereg.h  |    6 +-
 sys/dev/usb/if_kue.c     |   16 +-
 sys/dev/usb/if_udavreg.h |    4 +-
 sys/dev/usb/if_urlreg.h  |    4 +-
 12 files changed, 196 insertions(+), 265 deletions(-)

diffs (truncated from 1627 to 300 lines):

diff -r 574bafbca9ba -r 26f3b4996b5a sys/dev/usb/if_atu.c
--- a/sys/dev/usb/if_atu.c      Fri Sep 04 17:55:48 2009 +0000
+++ b/sys/dev/usb/if_atu.c      Fri Sep 04 18:10:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_atu.c,v 1.31 2009/09/04 17:53:58 dyoung Exp $ */
+/*     $NetBSD: if_atu.c,v 1.32 2009/09/04 18:10:08 dyoung Exp $ */
 /*     $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
 /*
  * Copyright (c) 2003, 2004
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.31 2009/09/04 17:53:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.32 2009/09/04 18:10:08 dyoung Exp $");
 
 #include "bpfilter.h"
 
@@ -1171,7 +1171,7 @@
 void
 atu_attach(device_t parent, device_t self, void *aux)
 {
-        struct atu_softc *sc = device_private(self);
+       struct atu_softc *sc = device_private(self);
        struct usb_attach_arg *uaa = aux;
        char                            *devinfop;
        usbd_status                     err;
@@ -1191,13 +1191,13 @@
        err = usbd_set_config_no(dev, ATU_CONFIG_NO, 1);
        if (err) {
                aprint_error_dev(self, "setting config no failed\n");
-                return;
+               return;
        }
 
        err = usbd_device2interface_handle(dev, ATU_IFACE_IDX, &sc->atu_iface);
        if (err) {
                aprint_error_dev(self, "getting interface handle failed\n");
-                return;
+               return;
        }
 
        sc->atu_unit = device_unit(self);
@@ -1239,7 +1239,7 @@
                 * so we don't want to do any more configuration after this
                 * point.
                 */
-                return;
+               return;
        }
 
        if (mode != MODE_NETCARD) {
@@ -1264,7 +1264,7 @@
                                    " been downloaded\n",
                                    USBDEVNAME(sc->atu_dev)));
                                atu_complete_attach(sc);
-                                return;
+                               return;
                        }
                }
 
@@ -1279,7 +1279,7 @@
                atu_complete_attach(sc);
        }
 
-        return;
+       return;
 }
 
 void
@@ -1320,7 +1320,7 @@
        err = atu_get_card_config(sc);
        if (err) {
                aprint_error("\n%s: could not get card cfg!\n",
-                    device_xname(sc->atu_dev));
+                   device_xname(sc->atu_dev));
                return;
        }
 
@@ -1406,7 +1406,7 @@
 int
 atu_detach(device_t self, int flags)
 {
-        struct atu_softc *sc = device_private(self);
+       struct atu_softc *sc = device_private(self);
        struct ifnet            *ifp = &sc->sc_if;
 
        DPRINTFN(10, ("%s: atu_detach state=%d\n", USBDEVNAME(sc->atu_dev),
@@ -1929,11 +1929,11 @@
 
        /* Init TX ring */
        if (atu_tx_list_init(sc))
-                printf("%s: tx list init failed\n", device_xname(sc->atu_dev));
+               printf("%s: tx list init failed\n", device_xname(sc->atu_dev));
 
        /* Init RX ring */
        if (atu_rx_list_init(sc))
-                printf("%s: rx list init failed\n", device_xname(sc->atu_dev));
+               printf("%s: rx list init failed\n", device_xname(sc->atu_dev));
 
        /* Load the multicast filter. */
        /*atu_setmulti(sc); */
diff -r 574bafbca9ba -r 26f3b4996b5a sys/dev/usb/if_atureg.h
--- a/sys/dev/usb/if_atureg.h   Fri Sep 04 17:55:48 2009 +0000
+++ b/sys/dev/usb/if_atureg.h   Fri Sep 04 18:10:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_atureg.h,v 1.7 2009/09/04 17:53:58 dyoung Exp $ */
+/*     $NetBSD: if_atureg.h,v 1.8 2009/09/04 18:10:08 dyoung Exp $ */
 /*     $OpenBSD: if_atureg.h,v 1.21 2004/12/23 13:19:38 dlg Exp $ */
 /*
  * Copyright (c) 2003
@@ -129,7 +129,7 @@
 #define ATU_AVG_TIME           20
 
 struct atu_softc {
-        device_t atu_dev;
+       device_t atu_dev;
        struct ethercom         sc_ec;
        struct ieee80211com     sc_ic;
        int                     (*sc_newstate)(struct ieee80211com *,
diff -r 574bafbca9ba -r 26f3b4996b5a sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c      Fri Sep 04 17:55:48 2009 +0000
+++ b/sys/dev/usb/if_aue.c      Fri Sep 04 18:10:08 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aue.c,v 1.113 2009/09/04 17:53:58 dyoung Exp $      */
+/*     $NetBSD: if_aue.c,v 1.114 2009/09/04 18:10:08 dyoung Exp $      */
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
  *     Bill Paul <wpaul%ee.columbia.edu@localhost>.  All rights reserved.
@@ -77,15 +77,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.113 2009/09/04 17:53:58 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.114 2009/09/04 18:10:08 dyoung Exp $");
 
-#if defined(__NetBSD__)
 #include "opt_inet.h"
 #include "bpfilter.h"
 #include "rnd.h"
-#elif defined(__OpenBSD__)
-#include "bpfilter.h"
-#endif /* defined(__OpenBSD__) */
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -101,9 +97,7 @@
 #endif
 
 #include <net/if.h>
-#if defined(__NetBSD__)
 #include <net/if_arp.h>
-#endif
 #include <net/if_dl.h>
 #include <net/if_media.h>
 
@@ -113,23 +107,12 @@
 #include <net/bpf.h>
 #endif
 
-#if defined(__NetBSD__)
 #include <net/if_ether.h>
 #ifdef INET
 #include <netinet/in.h>
 #include <netinet/if_inarp.h>
 #endif
-#endif /* defined(__NetBSD__) */
 
-#if defined(__OpenBSD__)
-#ifdef INET
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
-#include <netinet/ip.h>
-#include <netinet/if_ether.h>
-#endif
-#endif /* defined(__OpenBSD__) */
 
 
 #include <dev/mii/mii.h>
@@ -140,10 +123,8 @@
 #include <dev/usb/usbdi_util.h>
 #include <dev/usb/usbdevs.h>
 
-#if defined(__NetBSD__)
 #include <sys/condvar.h>
 #include <sys/kthread.h>
-#endif
 
 #include <dev/usb/if_auereg.h>
 
@@ -240,9 +221,7 @@
 CFATTACH_DECL_NEW(aue, sizeof(struct aue_softc), aue_match, aue_attach,
     aue_detach, aue_activate);
 
-#if defined(__NetBSD__)
 Static void aue_multithread(void *);
-#endif
 
 Static void aue_reset_pegasus_II(struct aue_softc *sc);
 Static int aue_tx_list_init(struct aue_softc *);
@@ -306,7 +285,7 @@
 
        if (err) {
                DPRINTF(("%s: aue_csr_read_1: reg=0x%x err=%s\n",
-                         device_xname(sc->aue_dev), reg, usbd_errstr(err)));
+                   device_xname(sc->aue_dev), reg, usbd_errstr(err)));
                return (0);
        }
 
@@ -333,7 +312,7 @@
 
        if (err) {
                DPRINTF(("%s: aue_csr_read_2: reg=0x%x err=%s\n",
-                         device_xname(sc->aue_dev), reg, usbd_errstr(err)));
+                   device_xname(sc->aue_dev), reg, usbd_errstr(err)));
                return (0);
        }
 
@@ -361,7 +340,7 @@
 
        if (err) {
                DPRINTF(("%s: aue_csr_write_1: reg=0x%x err=%s\n",
-                         device_xname(sc->aue_dev), reg, usbd_errstr(err)));
+                   device_xname(sc->aue_dev), reg, usbd_errstr(err)));
                return (-1);
        }
 
@@ -389,7 +368,7 @@
 
        if (err) {
                DPRINTF(("%s: aue_csr_write_2: reg=0x%x err=%s\n",
-                         device_xname(sc->aue_dev), reg, usbd_errstr(err)));
+                   device_xname(sc->aue_dev), reg, usbd_errstr(err)));
                return (-1);
        }
 
@@ -414,7 +393,7 @@
 
        if (i == AUE_TIMEOUT) {
                printf("%s: EEPROM read timed out\n",
-                    device_xname(sc->aue_dev));
+                   device_xname(sc->aue_dev));
        }
 
        return (aue_csr_read_2(sc, AUE_EE_DATA));
@@ -430,7 +409,7 @@
        int                     off = 0;
        int                     word;
 
-        DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
+       DPRINTFN(5,("%s: %s: enter\n", device_xname(sc->aue_dev), __func__));
 
        for (i = 0; i < 3; i++) {
                word = aue_eeprom_getword(sc, off + i);
@@ -452,19 +431,19 @@
 {
        mutex_exit(&sc->aue_mii_lock);
        if (--sc->aue_refcnt < 0)
-                usb_detach_wakeup((sc->aue_dev));
+               usb_detach_wakeup((sc->aue_dev));
 }
 
 Static int
 aue_miibus_readreg(device_t dev, int phy, int reg)
 {
-        struct aue_softc *sc = device_private(dev);
+       struct aue_softc *sc = device_private(dev);
        int                     i;
        u_int16_t               val;
 
        if (sc->aue_dying) {
 #ifdef DIAGNOSTIC
-                printf("%s: dying\n", device_xname(sc->aue_dev));
+               printf("%s: dying\n", device_xname(sc->aue_dev));
 #endif
                return 0;
        }
@@ -497,13 +476,13 @@
        }
 
        if (i == AUE_TIMEOUT) {
-                printf("%s: MII read timed out\n", device_xname(sc->aue_dev));
+               printf("%s: MII read timed out\n", device_xname(sc->aue_dev));
        }
 
        val = aue_csr_read_2(sc, AUE_PHY_DATA);
 
        DPRINTFN(11,("%s: %s: phy=%d reg=%d => 0x%04x\n",
-                     device_xname(sc->aue_dev), __func__, phy, reg, val));
+           device_xname(sc->aue_dev), __func__, phy, reg, val));
 
        aue_unlock_mii(sc);
        return (val);
@@ -512,7 +491,7 @@
 Static void
 aue_miibus_writereg(device_t dev, int phy, int reg, int data)
 {
-        struct aue_softc *sc = device_private(dev);
+       struct aue_softc *sc = device_private(dev);



Home | Main Index | Thread Index | Old Index