Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jan 2011 20:19:01 +0000 (UTC)
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r217065 - in head/sys/powerpc: aim cpufreq powermac
Message-ID:  <201101062019.p06KJ1Tn027192@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andreast
Date: Thu Jan  6 20:19:01 2011
New Revision: 217065
URL: http://svn.freebsd.org/changeset/base/217065

Log:
  Remove unused variables. Spotted by a cppcheck
  (devel/cppcheck, http://sourceforge.net/projects/cppcheck) run.
  
  Approved by: nwhitehorn (mentor)

Modified:
  head/sys/powerpc/aim/nexus.c
  head/sys/powerpc/aim/vm_machdep.c
  head/sys/powerpc/cpufreq/dfs.c
  head/sys/powerpc/cpufreq/pcr.c
  head/sys/powerpc/powermac/macgpio.c
  head/sys/powerpc/powermac/uninorth.c

Modified: head/sys/powerpc/aim/nexus.c
==============================================================================
--- head/sys/powerpc/aim/nexus.c	Thu Jan  6 20:05:24 2011	(r217064)
+++ head/sys/powerpc/aim/nexus.c	Thu Jan  6 20:19:01 2011	(r217065)
@@ -340,7 +340,6 @@ static int
 nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags,
     driver_filter_t *filter, driver_intr_t *ihand, void *arg, void **cookiep)
 {
-	driver_t	*driver;
 	int		error;
 
 	/* somebody tried to setup an irq that failed to allocate! */
@@ -351,8 +350,6 @@ nexus_setup_intr(device_t dev, device_t 
 	if ((rman_get_flags(res) & RF_SHAREABLE) == 0)
 		flags |= INTR_EXCL;
 
-	driver = device_get_driver(child);
-
 	/*
 	 * We depend here on rman_activate_resource() being idempotent.
 	 */

Modified: head/sys/powerpc/aim/vm_machdep.c
==============================================================================
--- head/sys/powerpc/aim/vm_machdep.c	Thu Jan  6 20:05:24 2011	(r217064)
+++ head/sys/powerpc/aim/vm_machdep.c	Thu Jan  6 20:19:01 2011	(r217065)
@@ -143,7 +143,6 @@ extern uintptr_t tocbase;
 void
 cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
 {
-	struct	proc *p1;
 	struct	trapframe *tf;
 	struct	callframe *cf;
 	struct	pcb *pcb;
@@ -156,8 +155,6 @@ cpu_fork(struct thread *td1, struct proc
 	if ((flags & RFPROC) == 0)
 		return;
 
-	p1 = td1->td_proc;
-
 	pcb = (struct pcb *)((td2->td_kstack +
 	    td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x2fUL);
 	td2->td_pcb = pcb;

Modified: head/sys/powerpc/cpufreq/dfs.c
==============================================================================
--- head/sys/powerpc/cpufreq/dfs.c	Thu Jan  6 20:05:24 2011	(r217064)
+++ head/sys/powerpc/cpufreq/dfs.c	Thu Jan  6 20:19:01 2011	(r217065)
@@ -165,12 +165,10 @@ dfs_settings(device_t dev, struct cf_set
 static int
 dfs_set(device_t dev, const struct cf_setting *set)
 {
-	struct dfs_softc *sc;
 	register_t hid1;
 	
 	if (set == NULL)
 		return (EINVAL);
-	sc = device_get_softc(dev);
 
 	hid1 = mfspr(SPR_HID1);
 	hid1 &= ~(HID1_DFS2 | HID1_DFS4);

Modified: head/sys/powerpc/cpufreq/pcr.c
==============================================================================
--- head/sys/powerpc/cpufreq/pcr.c	Thu Jan  6 20:05:24 2011	(r217064)
+++ head/sys/powerpc/cpufreq/pcr.c	Thu Jan  6 20:19:01 2011	(r217065)
@@ -305,12 +305,10 @@ pcr_set(device_t dev, const struct cf_se
 static int
 pcr_get(device_t dev, struct cf_setting *set)
 {
-	struct pcr_softc *sc;
 	uint64_t psr;
 
 	if (set == NULL)
 		return (EINVAL);
-	sc = device_get_softc(dev);
 
 	memset(set, CPUFREQ_VAL_UNKNOWN, sizeof(*set));
 

Modified: head/sys/powerpc/powermac/macgpio.c
==============================================================================
--- head/sys/powerpc/powermac/macgpio.c	Thu Jan  6 20:05:24 2011	(r217064)
+++ head/sys/powerpc/powermac/macgpio.c	Thu Jan  6 20:19:01 2011	(r217065)
@@ -264,10 +264,8 @@ static struct resource *
 macgpio_alloc_resource(device_t bus, device_t child, int type, int *rid,
 		     u_long start, u_long end, u_long count, u_int flags)
 {
-	struct macgpio_softc *sc;
 	struct macgpio_devinfo *dinfo;
 
-	sc = device_get_softc(bus);
 	dinfo = device_get_ivars(child);
 
 	if (type != SYS_RES_IRQ)

Modified: head/sys/powerpc/powermac/uninorth.c
==============================================================================
--- head/sys/powerpc/powermac/uninorth.c	Thu Jan  6 20:05:24 2011	(r217064)
+++ head/sys/powerpc/powermac/uninorth.c	Thu Jan  6 20:19:01 2011	(r217065)
@@ -530,11 +530,8 @@ static int
 unin_chip_activate_resource(device_t bus, device_t child, int type, int rid,
 			    struct resource *res)
 {
-	struct unin_chip_softc *sc;
 	void    *p;
 
-	sc = device_get_softc(bus);
-
 	if (type == SYS_RES_IRQ)
                 return (bus_activate_resource(bus, type, rid, res));
 



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