Remove unused variables. Spotted by a cppcheck

(devel/cppcheck, http://sourceforge.net/projects/cppcheck) run.

Approved by: nwhitehorn (mentor)
This commit is contained in:
Andreas Tobler 2011-01-06 20:19:01 +00:00
parent 574fe75809
commit 7dbe66c157
6 changed files with 0 additions and 15 deletions

View File

@ -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 child, struct resource *res, int flags,
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.
*/

View File

@ -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 *p2, struct thread *td2, int flags)
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;

View File

@ -165,12 +165,10 @@ dfs_settings(device_t dev, struct cf_setting *sets, int *count)
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);

View File

@ -305,12 +305,10 @@ pcr_set(device_t dev, const struct cf_setting *set)
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));

View File

@ -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)

View File

@ -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));