Module Name: src Committed By: msaitoh Date: Mon Mar 25 09:29:09 UTC 2019
Modified Files: src/sys/dev/mii: etphy.c inphy.c lxtphy.c nsphyter.c Log Message: KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/mii/etphy.c cvs rdiff -u -r1.57 -r1.58 src/sys/dev/mii/inphy.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/mii/lxtphy.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/mii/nsphyter.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/mii/etphy.c diff -u src/sys/dev/mii/etphy.c:1.3 src/sys/dev/mii/etphy.c:1.4 --- src/sys/dev/mii/etphy.c:1.3 Sun Feb 24 17:22:21 2019 +++ src/sys/dev/mii/etphy.c Mon Mar 25 09:29:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: etphy.c,v 1.3 2019/02/24 17:22:21 christos Exp $ */ +/* $NetBSD: etphy.c,v 1.4 2019/03/25 09:29:08 msaitoh Exp $ */ /* $OpenBSD: etphy.c,v 1.4 2008/04/02 20:12:58 brad Exp $ */ /* @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: etphy.c,v 1.3 2019/02/24 17:22:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: etphy.c,v 1.4 2019/03/25 09:29:08 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -193,9 +193,7 @@ etphy_service(struct mii_softc *sc, stru 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; @@ -211,9 +209,7 @@ etphy_service(struct mii_softc *sc, stru 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,9 +235,7 @@ etphy_service(struct mii_softc *sc, stru 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; Index: src/sys/dev/mii/inphy.c diff -u src/sys/dev/mii/inphy.c:1.57 src/sys/dev/mii/inphy.c:1.58 --- src/sys/dev/mii/inphy.c:1.57 Sun Feb 24 17:22:21 2019 +++ src/sys/dev/mii/inphy.c Mon Mar 25 09:29:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: inphy.c,v 1.57 2019/02/24 17:22:21 christos Exp $ */ +/* $NetBSD: inphy.c,v 1.58 2019/03/25 09:29:08 msaitoh Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1.57 2019/02/24 17:22:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: inphy.c,v 1.58 2019/03/25 09:29:08 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -106,9 +106,9 @@ inphymatch(device_t parent, cfdata_t mat struct mii_attach_args *ma = aux; if (mii_phy_match(ma, inphys) != NULL) - return (10); + return 10; - return (0); + return 0; } static void @@ -154,11 +154,9 @@ inphy_service(struct mii_softc *sc, stru 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: @@ -169,12 +167,10 @@ inphy_service(struct mii_softc *sc, stru 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; @@ -182,19 +178,17 @@ inphy_service(struct mii_softc *sc, stru 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. */ @@ -202,7 +196,7 @@ inphy_service(struct mii_softc *sc, stru /* Callback if something changed. */ mii_phy_update(sc, cmd); - return (0); + return 0; } static void Index: src/sys/dev/mii/lxtphy.c diff -u src/sys/dev/mii/lxtphy.c:1.52 src/sys/dev/mii/lxtphy.c:1.53 --- src/sys/dev/mii/lxtphy.c:1.52 Sun Feb 24 17:22:21 2019 +++ src/sys/dev/mii/lxtphy.c Mon Mar 25 09:29:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: lxtphy.c,v 1.52 2019/02/24 17:22:21 christos Exp $ */ +/* $NetBSD: lxtphy.c,v 1.53 2019/03/25 09:29:08 msaitoh Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lxtphy.c,v 1.52 2019/02/24 17:22:21 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lxtphy.c,v 1.53 2019/03/25 09:29:08 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -111,9 +111,9 @@ lxtphymatch(device_t parent, cfdata_t ma struct mii_attach_args *ma = aux; if (mii_phy_match(ma, lxtphys) != NULL) - return (10); + return 10; - return (0); + return 0; } static void @@ -171,11 +171,9 @@ lxtphy_service(struct mii_softc *sc, str 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: @@ -186,12 +184,10 @@ lxtphy_service(struct mii_softc *sc, str 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; @@ -204,19 +200,17 @@ lxtphy_service(struct mii_softc *sc, str 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. */ @@ -224,7 +218,7 @@ lxtphy_service(struct mii_softc *sc, str /* Callback if something changed. */ mii_phy_update(sc, cmd); - return (0); + return 0; } static void Index: src/sys/dev/mii/nsphyter.c diff -u src/sys/dev/mii/nsphyter.c:1.42 src/sys/dev/mii/nsphyter.c:1.43 --- src/sys/dev/mii/nsphyter.c:1.42 Fri Mar 8 09:59:15 2019 +++ src/sys/dev/mii/nsphyter.c Mon Mar 25 09:29:08 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nsphyter.c,v 1.42 2019/03/08 09:59:15 msaitoh Exp $ */ +/* $NetBSD: nsphyter.c,v 1.43 2019/03/25 09:29:08 msaitoh Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v 1.42 2019/03/08 09:59:15 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nsphyter.c,v 1.43 2019/03/25 09:29:08 msaitoh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -110,9 +110,9 @@ nsphytermatch(device_t parent, cfdata_t struct mii_attach_args *ma = aux; if (mii_phy_match(ma, nsphyters) != NULL) - return (10); + return 10; - return (0); + return 0; } static void @@ -155,11 +155,9 @@ nsphyter_service(struct mii_softc *sc, s 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: @@ -170,12 +168,10 @@ nsphyter_service(struct mii_softc *sc, s 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; @@ -183,19 +179,17 @@ nsphyter_service(struct mii_softc *sc, s 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. */ @@ -203,7 +197,7 @@ nsphyter_service(struct mii_softc *sc, s /* Callback if something changed. */ mii_phy_update(sc, cmd); - return (0); + return 0; } static void