Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/84da14bece44
branches:  trunk
changeset: 997754:84da14bece44
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Mar 25 09:20:46 2019 +0000

description:
KNF. No functional change.

diffstat:

 sys/dev/mii/acphy.c       |  36 +++++++-----------
 sys/dev/mii/atphy.c       |  32 ++++-----------
 sys/dev/mii/bmtphy.c      |  36 +++++++-----------
 sys/dev/mii/brgphy.c      |  91 +++++++++++++++++++++++++++-------------------
 sys/dev/mii/ciphy.c       |  63 +++++++++++--------------------
 sys/dev/mii/dmphy.c       |  12 +++---
 sys/dev/mii/etphy.c       |  16 ++-----
 sys/dev/mii/gentbi.c      |  40 ++++++++-----------
 sys/dev/mii/icsphy.c      |  38 ++++++++-----------
 sys/dev/mii/inphy.c       |  32 ++++++---------
 sys/dev/mii/iophy.c       |  37 +++++++-----------
 sys/dev/mii/lxtphy.c      |  32 ++++++---------
 sys/dev/mii/mii.c         |  17 ++++----
 sys/dev/mii/mii_physubr.c |  19 +++++----
 sys/dev/mii/nsphy.c       |  42 +++++++++------------
 sys/dev/mii/nsphyter.c    |  32 ++++++---------
 sys/dev/mii/pnaphy.c      |  34 +++++++----------
 sys/dev/mii/qsphy.c       |  30 +++++++-------
 sys/dev/mii/rdcphy.c      |  54 ++++++++++++--------------
 sys/dev/mii/rgephy.c      |  66 +++++++++++++--------------------
 sys/dev/mii/rlphy.c       |  38 +++++++-----------
 sys/dev/mii/sqphy.c       |  37 +++++++-----------
 sys/dev/mii/tlphy.c       |  58 ++++++++++++-----------------
 sys/dev/mii/tqphy.c       |  38 +++++++-----------
 sys/dev/mii/ukphy.c       |  30 ++++++---------
 sys/dev/mii/ukphy_subr.c  |  18 ++++----
 sys/dev/mii/urlphy.c      |  50 +++++++++----------------
 27 files changed, 438 insertions(+), 590 deletions(-)

diffs (truncated from 2821 to 300 lines):

diff -r 3152d2b217a1 -r 84da14bece44 sys/dev/mii/acphy.c
--- a/sys/dev/mii/acphy.c       Mon Mar 25 09:07:24 2019 +0000
+++ b/sys/dev/mii/acphy.c       Mon Mar 25 09:20:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acphy.c,v 1.27 2019/02/24 17:22:21 christos Exp $      */
+/*     $NetBSD: acphy.c,v 1.28 2019/03/25 09:20:46 msaitoh Exp $       */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.27 2019/02/24 17:22:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acphy.c,v 1.28 2019/03/25 09:20:46 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -87,9 +87,9 @@
        struct mii_attach_args *ma = aux;
 
        if (mii_phy_match(ma, acphys) != NULL)
-               return (10);
+               return 10;
 
-       return (0);
+       return 0;
 }
 
 static void
@@ -114,9 +114,7 @@
 
        PHY_RESET(sc);
 
-       /*
-        * XXX Check MCR_FX_SEL to set MIIF_HAVE_FIBER?
-        */
+       /* XXX Check MCR_FX_SEL to set MIIF_HAVE_FIBER? */
 
        PHY_READ(sc, MII_BMSR, &sc->mii_capabilities);
        sc->mii_capabilities &= ma->mii_capmask;
@@ -148,11 +146,9 @@
 
        switch (cmd) {
        case MII_POLLSTAT:
-               /*
-                * If we're not polling our PHY instance, just return.
-                */
+               /* If we're not polling our PHY instance, just return. */
                if (IFM_INST(ife->ifm_media) != sc->mii_inst)
-                       return (0);
+                       return 0;
                break;
 
        case MII_MEDIACHG:
@@ -163,12 +159,10 @@
                if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
                        PHY_READ(sc, MII_BMCR, &reg);
                        PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO);
-                       return (0);
+                       return 0;
                }
 
-               /*
-                * If the interface is not up, don't do anything.
-                */
+               /* If the interface is not up, don't do anything. */
                if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
                        break;
 
@@ -176,19 +170,17 @@
                break;
 
        case MII_TICK:
-               /*
-                * If we're not currently selected, just return.
-                */
+               /* If we're not currently selected, just return. */
                if (IFM_INST(ife->ifm_media) != sc->mii_inst)
-                       return (0);
+                       return 0;
 
                if (mii_phy_tick(sc) == EJUSTRETURN)
-                       return (0);
+                       return 0;
                break;
 
        case MII_DOWN:
                mii_phy_down(sc);
-               return (0);
+               return 0;
        }
 
        /* Update the media status. */
@@ -196,7 +188,7 @@
 
        /* Callback if something changed. */
        mii_phy_update(sc, cmd);
-       return (0);
+       return 0;
 }
 
 static void
diff -r 3152d2b217a1 -r 84da14bece44 sys/dev/mii/atphy.c
--- a/sys/dev/mii/atphy.c       Mon Mar 25 09:07:24 2019 +0000
+++ b/sys/dev/mii/atphy.c       Mon Mar 25 09:20:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atphy.c,v 1.20 2019/02/24 17:22:21 christos Exp $ */
+/*     $NetBSD: atphy.c,v 1.21 2019/03/25 09:20:46 msaitoh Exp $ */
 /*     $OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $  */
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.20 2019/02/24 17:22:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.21 2019/03/25 09:20:46 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -174,9 +174,7 @@
 
        switch (cmd) {
        case MII_POLLSTAT:
-               /*
-                * If we're not polling our PHY instance, just return.
-                */
+               /* If we're not polling our PHY instance, just return. */
                if (IFM_INST(ife->ifm_media) != sc->mii_inst)
                        return 0;
                break;
@@ -192,9 +190,7 @@
                        return 0;
                }
 
-               /*
-                * If the interface is not up, don't do anything.
-                */
+               /* If the interface is not up, don't do anything. */
                if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
                        break;
 
@@ -239,29 +235,21 @@
                        PHY_WRITE(sc, MII_100T2CR, 0);
                PHY_WRITE(sc, MII_ANAR, anar);
 
-               /*
-                * Start autonegotiation.
-                */
+               /* Start autonegotiation. */
                PHY_WRITE(sc, MII_BMCR, bmcr | BMCR_AUTOEN | BMCR_STARTNEG);
 done:
                break;
 
        case MII_TICK:
-               /*
-                * If we're not currently selected, just return.
-                */
+               /* If we're not currently selected, just return. */
                if (IFM_INST(ife->ifm_media) != sc->mii_inst)
                        return 0;
 
-               /*
-                * Is the interface even up?
-                */
+               /* Is the interface even up? */
                if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
                        return 0;
 
-               /*
-                * Only used for autonegotiation.
-                */
+               /* Only used for autonegotiation. */
                if ((IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) &&
                    (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T)) {
                        sc->mii_ticks = 0;
@@ -283,9 +271,7 @@
                if (sc->mii_ticks++ == 0)
                        break;
 
-               /*
-                * Only retry autonegotiation every mii_anegticks seconds.
-                */
+               /* Only retry autonegotiation every mii_anegticks seconds. */
                if (sc->mii_ticks <= sc->mii_anegticks)
                        break;
 
diff -r 3152d2b217a1 -r 84da14bece44 sys/dev/mii/bmtphy.c
--- a/sys/dev/mii/bmtphy.c      Mon Mar 25 09:07:24 2019 +0000
+++ b/sys/dev/mii/bmtphy.c      Mon Mar 25 09:20:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bmtphy.c,v 1.34 2019/02/24 17:22:21 christos Exp $     */
+/*     $NetBSD: bmtphy.c,v 1.35 2019/03/25 09:20:46 msaitoh Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1.34 2019/02/24 17:22:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bmtphy.c,v 1.35 2019/03/25 09:20:46 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -110,9 +110,9 @@
        struct mii_attach_args *ma = aux;
 
        if (mii_phy_match(ma, bmtphys) != NULL)
-               return (10);
+               return 10;
 
-       return (0);
+       return 0;
 }
 
 static void
@@ -138,9 +138,7 @@
 
        PHY_RESET(sc);
 
-       /*
-        * XXX Check AUX_STS_FX_MODE to set MIIF_HAVE_FIBER?
-        */
+       /* XXX Check AUX_STS_FX_MODE to set MIIF_HAVE_FIBER? */
 
        PHY_READ(sc, MII_BMSR, &sc->mii_capabilities);
        sc->mii_capabilities &= ma->mii_capmask;
@@ -160,11 +158,9 @@
 
        switch (cmd) {
        case MII_POLLSTAT:
-               /*
-                * If we're not polling our PHY instance, just return.
-                */
+               /* If we're not polling our PHY instance, just return. */
                if (IFM_INST(ife->ifm_media) != sc->mii_inst)
-                       return (0);
+                       return 0;
                break;
 
        case MII_MEDIACHG:
@@ -175,12 +171,10 @@
                if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
                        PHY_READ(sc, MII_BMCR, &reg);
                        PHY_WRITE(sc, MII_BMCR, reg | BMCR_ISO);
-                       return (0);
+                       return 0;
                }
 
-               /*
-                * If the interface is not up, don't do anything.
-                */
+               /* If the interface is not up, don't do anything. */
                if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
                        break;
 
@@ -188,19 +182,17 @@
                break;
 
        case MII_TICK:
-               /*
-                * If we're not currently selected, just return.
-                */
+               /* If we're not currently selected, just return. */
                if (IFM_INST(ife->ifm_media) != sc->mii_inst)
-                       return (0);
+                       return 0;
 
                if (mii_phy_tick(sc) == EJUSTRETURN)
-                       return (0);
+                       return 0;
                break;
 
        case MII_DOWN:
                mii_phy_down(sc);
-               return (0);
+               return 0;
        }
 
        /* Update the media status. */
@@ -208,7 +200,7 @@
 
        /* Callback if something changed. */
        mii_phy_update(sc, cmd);
-       return (0);
+       return 0;
 }
 
 static void
diff -r 3152d2b217a1 -r 84da14bece44 sys/dev/mii/brgphy.c
--- a/sys/dev/mii/brgphy.c      Mon Mar 25 09:07:24 2019 +0000
+++ b/sys/dev/mii/brgphy.c      Mon Mar 25 09:20:46 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: brgphy.c,v 1.82 2019/02/25 04:56:30 msaitoh Exp $      */
+/*     $NetBSD: brgphy.c,v 1.83 2019/03/25 09:20:46 msaitoh Exp $      */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.



Home | Main Index | Thread Index | Old Index