Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2009 17:14:55 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194024 - in head/sys/dev: mge smc
Message-ID:  <200906111714.n5BHEtEQ054563@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Jun 11 17:14:54 2009
New Revision: 194024
URL: http://svn.freebsd.org/changeset/base/194024

Log:
  strict kobj signatures: fix assortment of miibus_writereg impls
  
  return type should be int, not void
  
  Reviewed by:	imp, current@
  Approved by:	jhb (mentor)

Modified:
  head/sys/dev/mge/if_mge.c
  head/sys/dev/smc/if_smc.c
  head/sys/dev/smc/if_smcvar.h

Modified: head/sys/dev/mge/if_mge.c
==============================================================================
--- head/sys/dev/mge/if_mge.c	Thu Jun 11 17:14:28 2009	(r194023)
+++ head/sys/dev/mge/if_mge.c	Thu Jun 11 17:14:54 2009	(r194024)
@@ -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
 	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 ph
 
 	if (retries == 0)
 		device_printf(dev, "Timeout while writing to PHY\n");
+	return (0);
 }
 
 static int

Modified: head/sys/dev/smc/if_smc.c
==============================================================================
--- head/sys/dev/smc/if_smc.c	Thu Jun 11 17:14:28 2009	(r194023)
+++ head/sys/dev/smc/if_smc.c	Thu Jun 11 17:14:54 2009	(r194024)
@@ -999,7 +999,7 @@ smc_miibus_readreg(device_t dev, int phy
 	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 ph
 	    smc_read_2(sc, MGMT) & ~(MGMT_MCLK | MGMT_MDOE | MGMT_MDO));
 
 	SMC_UNLOCK(sc);
+	return (0);
 }
 
 void

Modified: head/sys/dev/smc/if_smcvar.h
==============================================================================
--- head/sys/dev/smc/if_smcvar.h	Thu Jun 11 17:14:28 2009	(r194023)
+++ head/sys/dev/smc/if_smcvar.h	Thu Jun 11 17:14:54 2009	(r194024)
@@ -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_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906111714.n5BHEtEQ054563>