strict kobj signatures: fix assortment of miibus_writereg impls

return type should be int, not void

Reviewed by:	imp, current@
Approved by:	jhb (mentor)
This commit is contained in:
Andriy Gapon 2009-06-11 17:14:54 +00:00
parent c0e55e3b65
commit 8e45f0b7c6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=194024
3 changed files with 7 additions and 5 deletions

View File

@ -88,7 +88,7 @@ static int mge_suspend(device_t dev);
static int mge_resume(device_t dev);
static int mge_miibus_readreg(device_t dev, int phy, int reg);
static void mge_miibus_writereg(device_t dev, int phy, int reg, int value);
static int mge_miibus_writereg(device_t dev, int phy, int reg, int value);
static int mge_ifmedia_upd(struct ifnet *ifp);
static void mge_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr);
@ -1287,13 +1287,13 @@ mge_miibus_readreg(device_t dev, int phy, int reg)
return (MGE_READ(sc_mge0, MGE_REG_SMI) & 0xffff);
}
static void
static int
mge_miibus_writereg(device_t dev, int phy, int reg, int value)
{
uint32_t retries;
if ((MV_PHY_ADDR_BASE + device_get_unit(dev)) != phy)
return;
return (0);
MGE_WRITE(sc_mge0, MGE_REG_SMI, 0x1fffffff &
(MGE_SMI_WRITE | (reg << 21) | (phy << 16) | (value & 0xffff)));
@ -1304,6 +1304,7 @@ mge_miibus_writereg(device_t dev, int phy, int reg, int value)
if (retries == 0)
device_printf(dev, "Timeout while writing to PHY\n");
return (0);
}
static int

View File

@ -999,7 +999,7 @@ smc_miibus_readreg(device_t dev, int phy, int reg)
return (val);
}
void
int
smc_miibus_writereg(device_t dev, int phy, int reg, int data)
{
struct smc_softc *sc;
@ -1029,6 +1029,7 @@ smc_miibus_writereg(device_t dev, int phy, int reg, int data)
smc_read_2(sc, MGMT) & ~(MGMT_MCLK | MGMT_MDOE | MGMT_MDO));
SMC_UNLOCK(sc);
return (0);
}
void

View File

@ -71,7 +71,7 @@ int smc_attach(device_t);
int smc_detach(device_t);
int smc_miibus_readreg(device_t, int, int);
void smc_miibus_writereg(device_t, int, int, int);
int smc_miibus_writereg(device_t, int, int, int);
void smc_miibus_statchg(device_t);
#endif /* _IF_SMCVAR_H_ */