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:
parent
ed097ecfc2
commit
78fe3fef1a
@ -285,7 +285,6 @@ dcphy_service(sc, mii, cmd)
|
||||
break;
|
||||
default:
|
||||
return(EINVAL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -146,7 +146,6 @@ bmtphy_probe(device_t dev)
|
||||
break;
|
||||
default:
|
||||
return (ENXIO);
|
||||
break;
|
||||
}
|
||||
|
||||
return (rval);
|
||||
|
@ -285,7 +285,6 @@ dcphy_service(sc, mii, cmd)
|
||||
break;
|
||||
default:
|
||||
return(EINVAL);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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, " ");
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user