svn commit: r192029 - head/sys/i386/cpufreq

Christian Brueffer brueffer at FreeBSD.org
Tue May 12 22:11:03 UTC 2009


Author: brueffer
Date: Tue May 12 22:11:02 2009
New Revision: 192029
URL: http://svn.freebsd.org/changeset/base/192029

Log:
  Remove unused variables.
  
  Found with:	Coverity Prevent(tm)
  CID:		4285, 4286

Modified:
  head/sys/i386/cpufreq/hwpstate.c

Modified: head/sys/i386/cpufreq/hwpstate.c
==============================================================================
--- head/sys/i386/cpufreq/hwpstate.c	Tue May 12 21:28:41 2009	(r192028)
+++ head/sys/i386/cpufreq/hwpstate.c	Tue May 12 22:11:02 2009	(r192029)
@@ -161,7 +161,6 @@ DRIVER_MODULE(hwpstate, cpu, hwpstate_dr
 static int
 hwpstate_goto_pstate(device_t dev, int pstate)
 {
-	struct hwpstate_softc *sc;
 	struct pcpu *pc;
 	int i;
 	uint64_t msr;
@@ -170,7 +169,6 @@ hwpstate_goto_pstate(device_t dev, int p
 	int id = pstate;
 	int error;
 	
-	sc = device_get_softc(dev);
 	/* get the current pstate limit */
 	msr = rdmsr(MSR_AMD_10H_11H_LIMIT);
 	limit = AMD_10H_11H_GET_PSTATE_LIMIT(msr);
@@ -299,7 +297,6 @@ hwpstate_type(device_t dev, int *type)
 static void
 hwpstate_identify(driver_t *driver, device_t parent)
 {
-	device_t child;
 
 	if (device_find_child(parent, "hwpstate", -1) != NULL)
 		return;
@@ -318,7 +315,7 @@ hwpstate_identify(driver_t *driver, devi
 	if (resource_disabled("hwpstate", 0))
 		return;
 
-	if ((child = BUS_ADD_CHILD(parent, 10, "hwpstate", -1)) == NULL)
+	if (BUS_ADD_CHILD(parent, 10, "hwpstate", -1) == NULL)
 		device_printf(parent, "hwpstate: add child failed\n");
 }
 


More information about the svn-src-all mailing list