Index: src/proc/scheduler.c
===================================================================
--- src/proc/scheduler.c	(revision b60a22c46e392bc508919c7fe80729aa7c60cee7)
+++ src/proc/scheduler.c	(revision a26ddd11445ebfd4a188b1e7aba9091fb10326d5)
@@ -103,5 +103,5 @@
 		 */
 		if (test_and_set(&CPU->kcpulbstarted) == 0) {
-    			waitq_wakeup(&CPU->kcpulb_wq, 0);
+			waitq_wakeup(&CPU->kcpulb_wq, 0);
 			goto loop;
 		}
@@ -239,5 +239,5 @@
 			 */
 			before_thread_runs();
-		    	spinlock_unlock(&THREAD->lock);
+			spinlock_unlock(&THREAD->lock);
 			cpu_priority_restore(THREAD->saved_context.pri);
 			return;
@@ -279,72 +279,71 @@
 		switch (THREAD->state) {
 		    case Running:
-			    THREAD->state = Ready;
-			    spinlock_unlock(&THREAD->lock);
-			    thread_ready(THREAD);
-			    break;
+			THREAD->state = Ready;
+			spinlock_unlock(&THREAD->lock);
+			thread_ready(THREAD);
+			break;
 
 		    case Exiting:
-			    frame_free((__address) THREAD->kstack);
-			    if (THREAD->ustack) {
-				    frame_free((__address) THREAD->ustack);
-			    }
-			    
-			    /*
-			     * Detach from the containing task.
-			     */
-			    spinlock_lock(&TASK->lock);
-			    list_remove(&THREAD->th_link);
-			    spinlock_unlock(&TASK->lock);
-
-			    spinlock_unlock(&THREAD->lock);
-			    
-			    spinlock_lock(&threads_lock);
-			    list_remove(&THREAD->threads_link);
-			    spinlock_unlock(&threads_lock);
-
-			    spinlock_lock(&CPU->lock);
-			    if(CPU->fpu_owner==THREAD) CPU->fpu_owner=NULL;
-			    spinlock_unlock(&CPU->lock);
-
-			    
-			    free(THREAD);
-			    
-			    break;
-			    
+			frame_free((__address) THREAD->kstack);
+			if (THREAD->ustack) {
+				frame_free((__address) THREAD->ustack);
+			}
+
+			/*
+			 * Detach from the containing task.
+			 */
+			spinlock_lock(&TASK->lock);
+			list_remove(&THREAD->th_link);
+			spinlock_unlock(&TASK->lock);
+
+			spinlock_unlock(&THREAD->lock);
+    
+			spinlock_lock(&threads_lock);
+			list_remove(&THREAD->threads_link);
+			spinlock_unlock(&threads_lock);
+
+			spinlock_lock(&CPU->lock);
+			if(CPU->fpu_owner==THREAD) CPU->fpu_owner=NULL;
+			spinlock_unlock(&CPU->lock);
+
+			free(THREAD);
+
+			break;
+    
 		    case Sleeping:
-			    /*
-			     * Prefer the thread after it's woken up.
-			     */
-			    THREAD->pri = -1;
-
-			    /*
-			     * We need to release wq->lock which we locked in waitq_sleep().
-			     * Address of wq->lock is kept in THREAD->sleep_queue.
-			     */
-			    spinlock_unlock(&THREAD->sleep_queue->lock);
-
-			    /*
-			     * Check for possible requests for out-of-context invocation.
-			     */
-			    if (THREAD->call_me) {
-				    THREAD->call_me(THREAD->call_me_with);
-				    THREAD->call_me = NULL;
-				    THREAD->call_me_with = NULL;
-			    }
-
-			    spinlock_unlock(&THREAD->lock);
-			    
-			    break;
+			/*
+			 * Prefer the thread after it's woken up.
+			 */
+			THREAD->pri = -1;
+
+			/*
+			 * We need to release wq->lock which we locked in waitq_sleep().
+			 * Address of wq->lock is kept in THREAD->sleep_queue.
+			 */
+			spinlock_unlock(&THREAD->sleep_queue->lock);
+
+			/*
+			 * Check for possible requests for out-of-context invocation.
+			 */
+			if (THREAD->call_me) {
+				THREAD->call_me(THREAD->call_me_with);
+				THREAD->call_me = NULL;
+				THREAD->call_me_with = NULL;
+			}
+
+			spinlock_unlock(&THREAD->lock);
+
+			break;
 
 		    default:
-			    /*
-			     * Entering state is unexpected.
-			     */
-			    panic("tid%d: unexpected state %s\n", THREAD->tid, thread_states[THREAD->state]);
-			    break;
+			/*
+			 * Entering state is unexpected.
+			 */
+			panic("tid%d: unexpected state %s\n", THREAD->tid, thread_states[THREAD->state]);
+			break;
 		}
 		THREAD = NULL;
 	}
-    
+
 	THREAD = find_best_thread();
 	
@@ -470,7 +469,7 @@
 				t = list_get_instance(l, thread_t, rq_link);
 				/*
-		    		 * We don't want to steal CPU-wired threads neither threads already stolen.
+				 * We don't want to steal CPU-wired threads neither threads already stolen.
 				 * The latter prevents threads from migrating between CPU's without ever being run.
-		        	 * We don't want to steal threads whose FPU context is still in CPU.
+				 * We don't want to steal threads whose FPU context is still in CPU.
 				 */
 				spinlock_lock(&t->lock);
@@ -498,5 +497,5 @@
 					atomic_dec(&nrdy);
 
-			    		r->n--;
+					r->n--;
 					list_remove(&t->rq_link);
 
@@ -528,5 +527,5 @@
 					
 				/*
-                    		 * We are not satisfied yet, focus on another CPU next time.
+				 * We are not satisfied yet, focus on another CPU next time.
 				 */
 				k++;
@@ -553,5 +552,5 @@
 		
 	goto not_satisfied;
-    
+
 satisfied:
 	/*
Index: src/proc/thread.c
===================================================================
--- src/proc/thread.c	(revision b60a22c46e392bc508919c7fe80729aa7c60cee7)
+++ src/proc/thread.c	(revision a26ddd11445ebfd4a188b1e7aba9091fb10326d5)
@@ -147,5 +147,5 @@
 	}	
 	spinlock_unlock(&cpu->lock);
-    
+
 	cpu_priority_restore(pri);
 }
@@ -278,5 +278,5 @@
 void thread_sleep(__u32 sec)
 {
-        thread_usleep(sec*1000000);
+	thread_usleep(sec*1000000);
 }
 
