Remove unnecessary breaks.

Remove unused variables.
Add XXX comment where a break may be missing. [lxtphy.c]

Found by:       FlexeLint
This commit is contained in:
phk 2003-05-31 19:48:33 +00:00
parent ed097ecfc2
commit 78fe3fef1a
9 changed files with 1 additions and 21 deletions

View File

@ -285,7 +285,6 @@ dcphy_service(sc, mii, cmd)
break;
default:
return(EINVAL);
break;
}
break;

View File

@ -170,11 +170,8 @@ pnphy_service(sc, mii, cmd)
struct mii_data *mii;
int cmd;
{
struct dc_softc *dc_sc;
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
dc_sc = mii->mii_ifp->if_softc;
switch (cmd) {
case MII_POLLSTAT:
/*
@ -215,17 +212,14 @@ pnphy_service(sc, mii, cmd)
mii->mii_media_active |= IFM_FDX;
MIIBUS_STATCHG(sc->mii_dev);
return(0);
break;
case IFM_10_T:
mii->mii_media_active = IFM_ETHER|IFM_10_T;
if ((ife->ifm_media & IFM_GMASK) == IFM_FDX)
mii->mii_media_active |= IFM_FDX;
MIIBUS_STATCHG(sc->mii_dev);
return(0);
break;
default:
return(EINVAL);
break;
}
break;

View File

@ -146,7 +146,6 @@ bmtphy_probe(device_t dev)
break;
default:
return (ENXIO);
break;
}
return (rval);

View File

@ -285,7 +285,6 @@ dcphy_service(sc, mii, cmd)
break;
default:
return(EINVAL);
break;
}
break;

View File

@ -239,7 +239,7 @@ lxtphy_service(sc, mii, cmd)
case IFM_100_FX:
lxtphy_set_fx(sc);
/* XXX: fall though intentional ?? */
default:
/*
* BMCR data is stored in the ifmedia entry.

View File

@ -520,10 +520,8 @@ int
mii_phy_detach(device_t dev)
{
struct mii_softc *sc;
struct mii_data *mii;
sc = device_get_softc(dev);
mii = device_get_softc(device_get_parent(dev));
mii_phy_down(sc);
sc->mii_dev = NULL;
LIST_REMOVE(sc, mii_list);

View File

@ -243,7 +243,6 @@ mlphy_service(xsc, mii, cmd)
(void) mii_phy_auto(sc);
msc->ml_linked = 0;
return(0);
break;
case IFM_10_T:
/*
* For 10baseT modes, reset and program the

View File

@ -132,11 +132,9 @@ nsgphy_attach(device_t dev)
struct mii_softc *sc;
struct mii_attach_args *ma;
struct mii_data *mii;
const struct mii_phydesc *mpd;
sc = device_get_softc(dev);
ma = device_get_ivars(dev);
mpd = mii_phy_match(ma, gphyters);
if (bootverbose)
device_printf(dev, "<rev. %d>\n", MII_REV(ma->mii_id2));
device_printf(dev, " ");

View File

@ -170,11 +170,8 @@ pnphy_service(sc, mii, cmd)
struct mii_data *mii;
int cmd;
{
struct dc_softc *dc_sc;
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
dc_sc = mii->mii_ifp->if_softc;
switch (cmd) {
case MII_POLLSTAT:
/*
@ -215,17 +212,14 @@ pnphy_service(sc, mii, cmd)
mii->mii_media_active |= IFM_FDX;
MIIBUS_STATCHG(sc->mii_dev);
return(0);
break;
case IFM_10_T:
mii->mii_media_active = IFM_ETHER|IFM_10_T;
if ((ife->ifm_media & IFM_GMASK) == IFM_FDX)
mii->mii_media_active |= IFM_FDX;
MIIBUS_STATCHG(sc->mii_dev);
return(0);
break;
default:
return(EINVAL);
break;
}
break;