svn commit: r333861 - head/sys/kern

Matt Macy mmacy at FreeBSD.org
Sat May 19 05:12:19 UTC 2018


Author: mmacy
Date: Sat May 19 05:12:18 2018
New Revision: 333861
URL: https://svnweb.freebsd.org/changeset/base/333861

Log:
  intr: eliminate / annotate unused stack locals

Modified:
  head/sys/kern/kern_intr.c

Modified: head/sys/kern/kern_intr.c
==============================================================================
--- head/sys/kern/kern_intr.c	Sat May 19 05:10:51 2018	(r333860)
+++ head/sys/kern/kern_intr.c	Sat May 19 05:12:18 2018	(r333861)
@@ -949,7 +949,6 @@ intr_event_schedule_thread(struct intr_event *ie)
 	struct intr_thread *it;
 	struct thread *td;
 	struct thread *ctd;
-	struct proc *p;
 
 	/*
 	 * If no ithread or no handlers, then we have a stray interrupt.
@@ -961,7 +960,6 @@ intr_event_schedule_thread(struct intr_event *ie)
 	ctd = curthread;
 	it = ie->ie_thread;
 	td = it->it_thread;
-	p = td->td_proc;
 
 	/*
 	 * If any of the handlers for this ithread claim to be good
@@ -973,7 +971,7 @@ intr_event_schedule_thread(struct intr_event *ie)
 		random_harvest_queue(&entropy, sizeof(entropy), 2, RANDOM_INTERRUPT);
 	}
 
-	KASSERT(p != NULL, ("ithread %s has no process", ie->ie_name));
+	KASSERT(td->td_proc != NULL, ("ithread %s has no process", ie->ie_name));
 
 	/*
 	 * Set it_need to tell the thread to keep running if it is already
@@ -1215,7 +1213,7 @@ swi_sched(void *cookie, int flags)
 	struct intr_handler *ih = (struct intr_handler *)cookie;
 	struct intr_event *ie = ih->ih_event;
 	struct intr_entropy entropy;
-	int error;
+	int error __unused;
 
 	CTR3(KTR_INTR, "swi_sched: %s %s need=%d", ie->ie_name, ih->ih_name,
 	    ih->ih_need);
@@ -1474,7 +1472,7 @@ intr_event_handle(struct intr_event *ie, struct trapfr
 	struct intr_handler *ih;
 	struct trapframe *oldframe;
 	struct thread *td;
-	int error, ret, thread;
+	int ret, thread;
 
 	td = curthread;
 
@@ -1547,7 +1545,9 @@ intr_event_handle(struct intr_event *ie, struct trapfr
 	
 	/* Schedule the ithread if needed. */
 	if (thread) {
-		error = intr_event_schedule_thread(ie);
+		int error __unused;
+
+		error =  intr_event_schedule_thread(ie);
 		KASSERT(error == 0, ("bad stray interrupt"));
 	}
 	critical_exit();


More information about the svn-src-head mailing list