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/000a151421e2
branches: trunk
changeset: 449820:000a151421e2
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Mar 25 07:34:13 2019 +0000
description:
KNF. No functional change.
diffstat:
sys/dev/mii/amhphy.c | 37 +++++++++-------------
sys/dev/mii/dmphy.c | 32 +++++++-----------
sys/dev/mii/exphy.c | 30 +++++++----------
sys/dev/mii/glxtphy.c | 35 ++++++++------------
sys/dev/mii/gphyter.c | 51 +++++++++++++-----------------
sys/dev/mii/igphy.c | 41 +++++++++---------------
sys/dev/mii/ihphy.c | 28 ++++------------
sys/dev/mii/ikphy.c | 34 ++++++++------------
sys/dev/mii/makphy.c | 18 +++-------
sys/dev/mii/micphy.c | 33 +++++++++----------
sys/dev/mii/mii_physubr.c | 78 ++++++++++++++++++++++------------------------
sys/dev/mii/mii_verbose.c | 13 ++++---
sys/dev/mii/mvphy.c | 35 +++++++++------------
13 files changed, 196 insertions(+), 269 deletions(-)
diffs (truncated from 1372 to 300 lines):
diff -r e98081a587bc -r 000a151421e2 sys/dev/mii/amhphy.c
--- a/sys/dev/mii/amhphy.c Mon Mar 25 07:09:54 2019 +0000
+++ b/sys/dev/mii/amhphy.c Mon Mar 25 07:34:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amhphy.c,v 1.22 2019/02/24 17:22:21 christos Exp $ */
+/* $NetBSD: amhphy.c,v 1.23 2019/03/25 07:34:13 msaitoh Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1.22 2019/02/24 17:22:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amhphy.c,v 1.23 2019/03/25 07:34:13 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -82,9 +82,9 @@
struct mii_attach_args *ma = aux;
if (mii_phy_match(ma, amhphys) != NULL)
- return (10);
+ return 10;
- return (0);
+ return 0;
}
static void
@@ -127,11 +127,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:
@@ -142,12 +140,10 @@
if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
PHY_READ(sc, MII_BMCR, ®);
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;
@@ -155,19 +151,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. */
@@ -175,7 +169,7 @@
/* Callback if something changed. */
mii_phy_update(sc, cmd);
- return (0);
+ return 0;
}
static void
@@ -218,9 +212,8 @@
if (ssr & SSR_S) {
/*
* This should't really ever happen, since it's
- * a 10BASE-T only PHY. But the bit exists,
- * according to the documentation, so we pay
- * attention to it.
+ * a 10BASE-T only PHY. But the bit exists, according
+ * to the documentation, so we pay attention to it.
*/
mii->mii_media_active |= IFM_100_TX;
} else
diff -r e98081a587bc -r 000a151421e2 sys/dev/mii/dmphy.c
--- a/sys/dev/mii/dmphy.c Mon Mar 25 07:09:54 2019 +0000
+++ b/sys/dev/mii/dmphy.c Mon Mar 25 07:34:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dmphy.c,v 1.41 2019/03/18 02:52:23 msaitoh Exp $ */
+/* $NetBSD: dmphy.c,v 1.42 2019/03/25 07:34:13 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dmphy.c,v 1.41 2019/03/18 02:52:23 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dmphy.c,v 1.42 2019/03/25 07:34:13 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -108,9 +108,9 @@
struct mii_attach_args *ma = aux;
if (mii_phy_match(ma, dmphys) != NULL)
- return (10);
+ return 10;
- return (0);
+ return 0;
}
static void
@@ -153,11 +153,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:
@@ -168,12 +166,10 @@
if (IFM_INST(ife->ifm_media) != sc->mii_inst) {
PHY_READ(sc, MII_BMCR, ®);
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;
@@ -181,19 +177,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. */
@@ -201,7 +195,7 @@
/* Callback if something changed. */
mii_phy_update(sc, cmd);
- return (0);
+ return 0;
}
static void
diff -r e98081a587bc -r 000a151421e2 sys/dev/mii/exphy.c
--- a/sys/dev/mii/exphy.c Mon Mar 25 07:09:54 2019 +0000
+++ b/sys/dev/mii/exphy.c Mon Mar 25 07:34:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exphy.c,v 1.55 2019/01/22 03:42:27 msaitoh Exp $ */
+/* $NetBSD: exphy.c,v 1.56 2019/03/25 07:34:13 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exphy.c,v 1.55 2019/01/22 03:42:27 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exphy.c,v 1.56 2019/03/25 07:34:13 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -97,15 +97,15 @@
*/
if (MII_OUI(ma->mii_id1, ma->mii_id2) != 0 &&
MII_MODEL(ma->mii_id2) != 0)
- return (0);
+ return 0;
/*
* Make sure the parent is an `ex'.
*/
if (!device_is_a(parent, "ex"))
- return (0);
+ return 0;
- return (10);
+ return 10;
}
static void
@@ -155,9 +155,7 @@
{
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
- /*
- * We can't isolate the 3Com PHY, so it has to be the only one!
- */
+ /* We can't isolate the 3Com PHY, so it has to be the only one! */
if (IFM_INST(ife->ifm_media) != sc->mii_inst)
panic("exphy_service: can't isolate 3Com PHY");
@@ -166,9 +164,7 @@
break;
case MII_MEDIACHG:
- /*
- * 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 +172,17 @@
break;
case MII_TICK:
- /*
- * Only used for autonegotiation.
- */
+ /* Only used for autonegotiation. */
if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
break;
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 +190,7 @@
/* Callback if something changed. */
mii_phy_update(sc, cmd);
- return (0);
+ return 0;
}
static void
@@ -209,5 +203,5 @@
* XXX 3Com PHY doesn't set the BMCR properly after
* XXX reset, which breaks autonegotiation.
*/
- PHY_WRITE(sc, MII_BMCR, BMCR_S100|BMCR_AUTOEN|BMCR_FDX);
+ PHY_WRITE(sc, MII_BMCR, BMCR_S100 | BMCR_AUTOEN | BMCR_FDX);
}
diff -r e98081a587bc -r 000a151421e2 sys/dev/mii/glxtphy.c
--- a/sys/dev/mii/glxtphy.c Mon Mar 25 07:09:54 2019 +0000
+++ b/sys/dev/mii/glxtphy.c Mon Mar 25 07:34:13 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: glxtphy.c,v 1.28 2019/02/24 17:22:21 christos Exp $ */
+/* $NetBSD: glxtphy.c,v 1.29 2019/03/25 07:34:13 msaitoh Exp $ */
Home |
Main Index |
Thread Index |
Old Index